Submit | All submissions | Best solutions | Back to list |
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
|
||||||||||||||
2014-01-16 17:32:04 appy
is dere a whitespaces before the output and the input ????........i m gettng WA fr a simple question |
||||||||||||||
2014-01-05 21:30:32 amit_gh
my answer is taking more than 2000bytes. How to overcome that |
||||||||||||||
2013-12-29 09:19:12 Aakash Chandrasekaran
nice problem :) |
||||||||||||||
2013-12-27 08:51:38 Denys
I've checked results of my program with table of factorials - everything looks good for all possible inputs (0<=n<=100), for example for 100! = 93326215...000000000. It looks like an error in test cases, please can anybody check tests? Last edit: 2013-12-27 13:14:58 |
||||||||||||||
2013-12-24 17:50:12 Abhishek Sharma
"wrong answer" is displayed,despite running correctly on my terminal. What could be possible error? |
||||||||||||||
2013-12-09 06:33:03 Jinal
My code is perfectly correct..works right on ideone, bt still shows "wrong answer" here....pls someone help..... |
||||||||||||||
2013-12-08 07:45:10 Shivam Dimri
it depends which language you are choosing to code this problem, java is very helpful as it allows user to handle big integer calculations and manipulations easily whereas in c++ you need to store big integers in form of array of digits. |
||||||||||||||
2013-12-01 23:04:54 Abhishek Tyagi
Have you guys tried the program for values >21?? Last edit: 2013-12-01 23:05:03 |
||||||||||||||
2013-11-09 09:33:48 Rahul Jain
after n=34, 0 gets printed ..WHY?? |
||||||||||||||
2013-11-08 04:10:35 Stalcone
@Pratham Pandey, that's impossible due to condition: 1<=n<=100. Last edit: 2013-11-08 04:10:59 |