Problem 5: Smallest multiple
Problem Explanation
- In this challenge we need to find the LCM of 1 to n numbers.
- To find LCM of a number we use the following formula:
- To find GCD (Greatest Common Divisor) of two number we use Euclidean algorithm.
- Once we get LCM of two numbers, we can get LCM of the numbers from 1 to n.