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
2012-02-29 16:41:20 Vikas Yadav
what name to give to file in java????
2012-02-23 01:23:12 Dario Pavlovic
im really not sure why im getting a wrong answer here, i checked almost all possible solutions with wolfram alpha and still getting wa.

Last edit: 2012-02-23 01:24:30
2011-12-30 12:46:08 Mukund Kumar
i m getting ri8 answr on turbo compiler....hwevr gettin ce on it.....plz help
2011-12-06 22:54:37 Santiago Zubieta
Use BigInteger in Java..
2011-11-08 05:54:10 jayanth kumar
how to store values from 40! to 100!
i am not getting the correct output.
2011-10-04 21:12:22 Dominik
I sent 10 times, tested more than 10 numbers like 0,1,2,3,4,5,10,20,30,50,60,70,80,90,100... All are correct and I'm printing cout << endl; after each (I also tried with printf("\n");... And whole time I'm getting wrong answer T_T, is there some kind of bug?? (programiming in C++) Thx for any reply
2011-10-02 06:51:27 jayesh hathila
i ran a for loop and printed all the test cases from 1 t0 100 but here its giving "nzec".plz help me
2011-09-25 05:32:55 Hitman
I got runtime error NZEC, while uploading my code in python. why??
2011-09-25 04:49:39 Bishma
www.wolframalpha.com says 100! = 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
and my output says that in my computer. Why am I getting wrong answer here?
2011-09-17 04:51:56 Santiago Palacio
@kostis: long double wont do enough for 100!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.