#K80732. Smallest Multiple

    ID: 35596 Type: Default 1000ms 256MiB

Smallest Multiple

Smallest Multiple

Given a positive integer \(N\), your task is to compute the smallest positive integer that is evenly divisible by all of the numbers from \(1\) to \(N\). This problem can be efficiently approached by using the least common multiple (LCM) computed via the greatest common divisor (GCD). The formula for two numbers \(a\) and \(b\) is given by:

[ \text{lcm}(a,b)=\frac{a\times b}{\gcd(a,b)} ]

For example, when \(N = 10\), the smallest multiple is \(2520\).

inputFormat

The input begins with a single integer \(T\) (the number of test cases). Each of the following \(T\) lines contains a single integer \(N\). You need to compute the smallest positive integer that is evenly divisible by every number from \(1\) to \(N\) for each test case.

outputFormat

For each test case, output the smallest positive integer on a new line.

## sample
3
1
5
10
1

60 2520

</p>