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
Subhajit Sadhu: 2010-05-06 14:58:49

my own compiler is giving correct result..bt when I'm submitting in ur compiler it is giving "runtime error (SIGABRT)" wht does this imply ???

Jason Robinson: 2009-12-31 17:03:49

It seems that bignum is disabled for Perl. How can we provide the desired answer without it?

xiaodao: 2009-09-21 05:40:31

Evaluating the scale of the result sometimes is important..especially for this one..

Krzysztof Kosiñski: 2009-09-05 13:48:30

biswajyoti das: it means you defined main() with a return type other than int and/or you are missing a 'return 0' at the end.

Emad William: 2009-07-05 09:48:21

use big numbers (i.e. store in a string)

Yonggang Li: 2009-02-28 02:44:44

It's more easy when using oparator overload.


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