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
|
||||||||||||||
2012-12-03 17:39:09 Navya
my code is working fine on ideone bt here it is giving wrong ans...cn u tell y?? |
||||||||||||||
2012-11-27 15:33:17 Zhongyuan.Lee
"small"? Indeed, we have to use array to store the number |
||||||||||||||
2012-11-25 17:10:45 smas
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 |
||||||||||||||
2012-11-11 09:24:32 :D
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. As for multiple files, it's a great idea but hard to implement and again it would be mostly unused, since solutions here aren't that big. In the end it would be a wasted effort on system development part. You can't submit compiled or half compiled code because, again, it's redundant, would be complicated and would cause safety issues. Also problems can be better compared when compiled with the same compiler (for a given language). |
||||||||||||||
2012-11-10 23:43:53 reggaeguitar
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 |
||||||||||||||
2012-11-03 08:35:40 Một Bạn Trai Giấu Tên
the result is so "small" !!! |
||||||||||||||
2012-10-28 19:47:36 Erik Lonèarek
Use an array to hold the numbers. Last edit: 2012-10-28 19:47:56 |
||||||||||||||
2012-10-21 17:12:32 Abhash Singh
@Luke hahaha.. |
||||||||||||||
2012-10-21 11:50:17 ahmed
why got WA |
||||||||||||||
2012-09-20 22:12:36 saurabh
there is tutorial of this question on codechef in easy section .........try it |