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
algo_aris: 2015-12-09 15:31:37

java.Math.BigInteger feel comfort with this. 0,12 sec

shreeyash: 2015-10-18 19:06:45

100! is not a small factorial.

vishal92p: 2015-09-30 20:18:21

works successfully on ideone but wrong answer here.

alexbandeira: 2015-09-29 04:04:44

Very easy in Python! (=

shshnk28: 2015-09-12 17:10:12

this was easy, sort the input and use the previous one to calculate the next. then display it the input order

archit saxena: 2015-08-29 20:34:26

ac in second attempt

Achmad Rozikin: 2015-08-29 05:58:27

my code looks ugly because the source limit....
but i got AC

Ashutosh Singh Chandel: 2015-08-27 08:13:06

no need to include 0! case. my code was accepted .

iit2015068: 2015-08-23 11:56:04

can someone elaborate the problem? I am struck in the language of the problem

amous_19291: 2015-08-19 12:45:06

my solution is giving right answer for every test case....but still i m getting wrong answer........


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