FCTRL2 - Small factorials


You are asked to calculate factorials of some small positive integers.

Input

An integer t, 1 ≤ t ≤ 100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1 ≤ n ≤ 100.

Output

For each integer n given at input, display a line with the value of n!

Example

Input:
4
1
2
5
3

Output:
1
2
120
6

hide comments
arushi: 2013-07-03 16:39:24

wat if the user types 0 as one of the facts. are we supposed to give ans of other nos?

José Alvarez: 2013-06-21 13:44:57

I am submitting my c++ code and it says WRONG answer, and my code works perfectly in every case :S

Retired: 2013-06-03 17:30:12

Yeah!!! My first prob in python :D..Too easy..

SASI : 2013-05-31 05:19:11

Hi, i was getting correct answer in for every test cases in idone but still my code was not accepted by spoj complier
*** iam getting WRONG ANSWER after submission so please help me

Jorian: 2013-05-28 01:34:53

i'm really stunned when spoj compiler is accepting my code. Thankful to python!.....

Globussoft: 2013-05-15 16:52:59

In my system in C# code is working fine.but here it shows compilation error.Is anybody
knows about this issue.

Gitesh: 2013-05-15 10:36:01

@all
Java can also be used pretty easily,
ever heard of BigInteger eh?? :P

Rishabh Dugar: 2013-05-15 09:29:00

m nt getting restult for 99,,which dat type to use?? used double long...

Ashutosh Pandey: 2013-04-17 07:48:19

using GMP library i am able to calculate the factorail of the number 1000000 but while compiling i have to write
gcc -o batchfilename soucefilename.c -lgmp but compiling on this website have usual command which sows error

ওয়াসী (Wasi): 2013-04-01 13:06:30

Thanks to python. Its just too easy :P


Added by:adrian
Date:2004-05-28
Time limit:1s
Source limit:2000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All