SAS002 - Apoorv and Math problem


Apoorv is an expert in maths .There are very few questions in maths that Apoorv is unable to answer. Apoorv's teacher is not very fond of Apoorv. So he decided to give Apoorv a  function value to calculate. Apoorv is unable to solve this problem and turns to you for help. Help him to find the answer to the function quickly. Apoorv's teacher will only check the final answer. So Apoorv is free to do calculate the value by any function he likes but the final answer should be same. Also as his teacher don't like him much he gave him a very strict time limit to solve the problem. Help Apoorv in finding the answer quickly.

The function given by Apoorv's teacher is as follows:

function(number) {
              answer = 1
              for ( each i from 1 to number) {
                   if( number modulo i is 0  ) {
                       answer=answer multiplied by i 
                   }
              }
              return answer
          }

Constraints

At max 100 numbers will be given by Apoorv's teacher. The value of number given by Apoorv's teacher will easily fit into 64 bit-integer and will always be positive.

Input

First line will contain t denoting t numbers that are given by Apoorv's teacher.

Next t lines will contain a single integer denoting the number.

Output

For each t numbers output the value of answer in new line. Since the value of answer can be very large Apoorv's teacher is fine with you reporting the answer modulo 109+7.

Example

Input:
2
1
2
Output: 1
2

hide comments
trijeet: 2017-10-25 01:03:56

Great Problem ! AC in 5th go ;)

visleck: 2017-08-16 17:52:29

@sas1905 can u tell me where I am going wrong.I believe I am doing it correctly

sas1905: 2017-08-16 09:17:52

@pvsmpraveen going by the constraints I don't think so.

sas1905: 2017-08-16 09:15:11

@amulyagaur the number is positive and constraint range is range of 64 bit integer.

amulyagaur: 2017-08-16 08:50:31

@sas1905 what are the specific constraints??

harsh_verma: 2017-08-15 11:03:43

really good 1 :)

divyanshjr: 2017-08-15 10:05:34

Sas pro! Please don't call it an easy problem.. :P

pvsmpraveen: 2017-08-15 07:26:50

Nice Question AC in 2 go :)
@sas1905 is there easy way to solve it other than what i did?

siddharth_0196: 2017-08-14 09:33:23

Sasmit toh bas sakate hi ja raha hai! _/\_

aman224: 2017-08-13 20:53:40

Sas pro /\
Another awesome one :)


Added by:sas1905
Date:2017-08-13
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:College Contests.