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
harshgupta007:
2016-02-04 19:31:52
AC in one go using JAVA!!!! 0.12sec |
|
lochnesscookie:
2016-02-01 02:29:29
For those that are creating their own "biginteger" objects or structs or whatever, make sure your display methods print a line after printing all the digits. (that might be causing wrong answers) |
|
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!
|
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |