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
hide comments
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 |