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
4 1 2 5 3
Sample output:
1 2 120 6
hide comments
yash19970:
2016-01-25 22:02:49
though m getting correct answer, its telling wronge :( |
|
neel2ka1:
2016-01-09 18:53:00
Giving wrong answer. Mine's right though |
|
Thomas Dybdahl Ahle:
2016-01-03 22:45:23
I thought you couldn't use boost with spoj? http://discuss.spoj.com/t/boost/2751
|
|
damsehgal:
2016-01-02 15:11:04
my 0.6 :) |
|
deepukps:
2015-12-18 10:27:17
Is there any way I can bigInteger using boost (C++) . Thanks in advance .
|
|
kelvin_chui:
2015-12-17 11:20:32
For C++ users, use the boost library, then your code should look like ordinary factorial calculation, with 1 extra line of #include! |
|
vaibhav_gupta:
2015-12-15 17:45:17
Though I am getting a correct answer, I am getting a wrong answer comment.
|
|
yokesh1:
2015-12-09 19:25:01
Though I'm getting correct answer, it tells that the answer is wrong!
|
|
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. |
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |