Problems
The Least Common Multiple
The Least Common Multiple
Find the Least Common Multiple for all integers from 1 to n.
The Least Common Multiple of positive integers a1
, a2
, ...
, ak
is an integer A, such that A is divisible by ai
for all i from 1 to k, and A is the least positive integer with such property.
Input
One integer n (1 ≤ n ≤ 1000).
Output
Print one number - the Least Common Multiple of all numbers from 1 to n.
Input example #1
3
Output example #1
6