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
Navya:
2012-12-03 17:39:09
my code is working fine on ideone bt here it is giving wrong ans...cn u tell y?? |
|
Zhongyuan.Lee:
2012-11-27 15:33:17
"small"? Indeed, we have to use array to store the number |
|
smas:
2012-11-25 17:10:45
Source limit is so stupid, especially in Java you have to add a lot of lines of code Last edit: 2012-11-25 17:11:02 |
|
:D:
2012-11-11 09:24:32
It's not a work simulator. Restrictions are there to make the system lighter, simpler and safer. 50kb of code is more that enough. Maybe a few times I wrote something around 20-something kb and they had many unused functions file head. Sometimes limit is lower to enforce a particular, harder solution.
|
|
reggaeguitar:
2012-11-10 23:43:53
I don't understand why we can't use libraries, and why there is a source file byte limit. At work one doesn't have these restrictions, seems kind of artificial to me |
|
Một Bạn Trai Giấu Tên:
2012-11-03 08:35:40
the result is so "small" !!! |
|
Erik Lonèarek:
2012-10-28 19:47:36
Use an array to hold the numbers. Last edit: 2012-10-28 19:47:56 |
|
Abhash Singh:
2012-10-21 17:12:32
@Luke hahaha.. |
|
ahmed:
2012-10-21 11:50:17
why got WA |
|
saurabh:
2012-09-20 22:12:36
there is tutorial of this question on codechef in easy section .........try it |
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |