Back to questions

Smallest Multiple Google Python Interview Question

Smallest Multiple

Google Python Interview Question

Write a function to find the smallest number that is perfectly divisible (i.e. no remainder) by all numbers from 1 to the target number.

For example, if the target value was 5, we'd return 60, because 60 is evenly divisible by 1, 2, 3, 4, and 5. There is no number smaller than 60 which satisfies this condition.

Input

(Python)

Output