The Least Common Multiple
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Find the Least Common Multiple for all integers from 1 to n.
The Least Common Multiple of positive integers a[1]
, a[2]
, ...
, a[k]
is an integer A, such that A is divisible by a[i]
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.
Examples
Input #1
Answer #1
Submissions 6K
Acceptance rate 31%