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

Sample input:
4
1
2
5
3

Sample 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-09-07 20:03:15 KARTHIKEYA
For me too, "wrong answer" is displayed even if the code is correct.

Last edit: 2013-09-07 20:04:38
2013-09-04 08:40:03 SP.HARISH
Even if the code is perfectly correct, I always get wrong answer... Can someone help?
2013-09-03 14:47:53 Raja CSE
i am submitting my c++ code and it says copliation error, and my code works perfectly in every case :S
2013-08-22 03:43:54 Laura Romano
Why do I get "wrong answer" if my code works perfectly fine?
2013-08-19 17:58:26 Karan Khanna
Sir i am getting the correct result for every test case in Dev-C++ compiler but its giving wrong answer on submission of my code.
Please help!!
2013-08-19 05:36:29 Gagandeep
hi! i have submitted in java,it gives wrong answer
but it works perfectly in every case
2013-07-30 17:56:08 rohit kumar
ADMIN: plz check my code ID: 9751627
checked for all including 100!
getting wrong ans
plzz reply
2013-07-06 03:02:53 alvaro
each containing a single integer n, 1<=n<=100.
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.