#K6581. Minimal Candies Distribution
Minimal Candies Distribution
Minimal Candies Distribution
You are given two positive integers (a) and (b). Your task is to find the minimal number (t) of candies such that (t) is divisible by both (a) and (b). In other words, compute the least common multiple (LCM) of (a) and (b). The LCM is defined as $$\mathrm{lcm}(a, b) = \frac{|a \cdot b|}{\gcd(a,b)}.$$
inputFormat
The input consists of a single line containing two positive integers (a) and (b), separated by space.
outputFormat
Output a single integer representing the minimal number of candies (i.e. the LCM of (a) and (b)).## sample
6 8
24