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

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

hide comments
2015-01-27 11:59:43 Lehar
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
2015-01-24 17:13:08 Mitch Schwartz
"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
2015-01-24 13:51:02 wisfaq
reminder-->remainder

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

Last edit: 2015-01-24 13:56:43
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.