#K47262. Minimum Multiple
Minimum Multiple
Minimum Multiple
You are given two positive integers (a) and (b). Your task is to compute the smallest integer (N) such that:
- (N) is divisible by both (a) and (b), and
- (N) is greater than or equal to the least common multiple (LCM) of (a) and (b).
In fact, the answer is just the least common multiple of (a) and (b), which can be computed by the formula: [ \text{LCM}(a, b) = \frac{a \times b}{\gcd(a, b)} ]
You need to read the input from standard input and output the result to standard output.
inputFormat
The input consists of two positive integers (a) and (b) separated by whitespace (space or newline).
outputFormat
Output a single integer, the least common multiple (LCM) of (a) and (b).## sample
6 8
24