Least Common Multiple
EasyMath
Description
Given two positive integers a and b, return their least common multiple.
Examples
Input:
a = 4, b = 6Output:
12Explanation:
The smallest positive number that both 4 and 6 divide into is 12.
Input:
a = 3, b = 5Output:
15Explanation:
The smallest positive number that both 3 and 5 divide into is 15.
Input:
a = 12, b = 8Output:
24Explanation:
The smallest positive number that both 12 and 8 divide into is 24.
Constraints
- •
1 ≤ a, b ≤ 10⁴