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
|
||||||||||||||
2013-07-03 16:39:24 arushi
wat if the user types 0 as one of the facts. are we supposed to give ans of other nos? |
||||||||||||||
2013-06-21 13:44:57 José Alvarez
I am submitting my c++ code and it says WRONG answer, and my code works perfectly in every case :S |
||||||||||||||
2013-06-03 17:30:12 Retired
Yeah!!! My first prob in python :D..Too easy.. |
||||||||||||||
2013-05-31 05:19:11 SASI
Hi, i was getting correct answer in for every test cases in idone but still my code was not accepted by spoj complier *** iam getting WRONG ANSWER after submission so please help me |
||||||||||||||
2013-05-28 01:34:53 Jorian
i'm really stunned when spoj compiler is accepting my code. Thankful to python!..... |
||||||||||||||
2013-05-15 16:52:59 Globussoft
In my system in C# code is working fine.but here it shows compilation error.Is anybody knows about this issue. |
||||||||||||||
2013-05-15 10:36:01 Gitesh
@all Java can also be used pretty easily, ever heard of BigInteger eh?? :P |
||||||||||||||
2013-05-15 09:29:00 Rishabh Dugar
m nt getting restult for 99,,which dat type to use?? used double long... |
||||||||||||||
2013-04-17 07:48:19 Ashutosh Pandey
using GMP library i am able to calculate the factorail of the number 1000000 but while compiling i have to write gcc -o batchfilename soucefilename.c -lgmp but compiling on this website have usual command which sows error |
||||||||||||||
2013-04-01 13:06:30 ওয়াসী (Wasi)
Thanks to python. Its just too easy :P |