| CodeRams Practice Problem Archive |
|---|
| Закончено |
You've just bought a set of practice katanas, which have an item number of 1101-1816. While staring at this item number, you wonder what the LCM (Least Common Multiple) of 1101 and 1816 is.
To calculate the LCM of two numbers, you can multiply the two numbers together, and divide this result by the GCD (Greatest Common Divisor) of the two numbers. For example, let's take the numbers 60 and 72. Their GCD is 12 (12 is the greatest number that divides both numbers), their product (60 x 72) is 4320, and their GCD is 4320 / 12 = 360. To calculate the GCD of two numbers, you can use this recursive formula:
gcd(a, b) = a, if b = 0
otherwise, gcd(a, b) = gcd(b, a mod b)
The only line of input contains two positive integers $$$a$$$ and $$$b$$$.
Output a single positive integer $$$n$$$: the LCM (Least Common Multiple) of $$$a$$$ and $$$b$$$.
2 4
4
1101 1816
1999416
| Название |
|---|


