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 bitinteger 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 10^{9}+7.
Example
Input: 2
1
2
Output: 1
2
hide comments
barishnamazov:
20180613 18:19:22
Finally, accepted after fixing tons of overflow bugs :) Nice problem. 

nadstratosfer:
20180310 22:27:44
Tanzir Islam, that's most likely down to the probabilistic nature of youknowwhat algo you've employed. This problem demands it to be more bulletproof than usual. 

Tanzir Islam:
20180310 09:14:34
@sas1905


Tanzir Islam:
20180310 08:55:17
@orion_pax


orion_pax:
20180308 22:07:13
@sas1905 I think test cases are wrong for >=2^63, I simply printed "716550366" for every remaining test case whenever a no. >=2^63 encountered first time in the input and got AC. "716550366" is answer for 2^63  1. Correct me if I'm wrong Last edit: 20180308 23:04:58 

sas1905:
20171204 19:07:02
Edit :@ nadstratosfer: Glad you liked the problem :) Last edit: 20171205 07:17:57 

nadstratosfer:
20171204 12:44:50
sas1905, please let me know which case my code fails on. It seems to be passing all the traps I can throw at it. BTW not sure if such cases are in testfiles but for n >= 2^63 judge solution appears to break.


trijeet:
20171025 01:03:56
Great Problem ! AC in 5th go ;) 

visleck:
20170816 17:52:29
@sas1905 can u tell me where I am going wrong.I believe I am doing it correctly 

sas1905:
20170816 09:17:52
@pvsmpraveen going by the constraints I don't think so. 
Added by:  sas1905 
Date:  20170813 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  College Contests. 