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

Sample input:
4
1
2
5
3

Sample 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
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.