SMALL - Smallest Number


Your task is extremely simple, for a given number N you have to find the smallest number which is divisible by all numbers from 1 to N without leaving any remainder. As the number can be very large print the answer modulo 1000000007.

Input

Input starts with a positive integer T < 501 in a single line, then T lines follow. Each of the T lines contains one positive integer N < 10001.

Output

For every N print the desired number.

Example

Input:
1
5

Output:
60

hide comments
Lehar: 2015-01-27 11:59:43

I am getting correct answer on my machine but here it gives WA. Can you please check my last submission?

re(vamsi): write a brute force and compare your results(at least upto 500)

Last edit: 2015-01-29 13:51:44
Mitch Schwartz: 2015-01-24 17:13:08

"without leaving any remainder" is redundant -- that is what divisible means. (It's not very important, but seems an odd choice stylistically.)

Last edit: 2015-01-24 18:25:02
wisfaq: 2015-01-24 13:51:02

reminder-->remainder

--Lakshman-->Thanks
--wisfaq-->you're welcome

Last edit: 2015-01-24 13:56:43

Added by:[Lakshman]
Date:2015-01-24
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 JS-MONKEY