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

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

hide comments
2010-05-06 14:58:49 Subhajit Sadhu
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 ???
2009-12-31 17:03:49 Jason Robinson
It seems that bignum is disabled for Perl. How can we provide the desired answer without it?
2009-09-21 05:40:31 xiaodao
Evaluating the scale of the result sometimes is important..especially for this one..
2009-09-05 13:48:30 Krzysztof Kosiñski
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.
2009-07-05 09:48:21 Emad William
use big numbers (i.e. store in a string)
2009-02-28 02:44:44 Yonggang Li
It's more easy when using oparator overload.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.