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
2011-03-17 09:45:07 Nenu Anda Roxana
I am getting WA but my program works on my machine. How to handle the output???
2011-02-22 21:06:55 Qianli Ma
Should not allow python3 for this problem...
2011-02-07 20:03:21 sayed khalaf sayed
Why WA?? i have right outputs. please how to handle the output..
2011-02-07 19:35:45 Ahmed Atif Salah
I have WA, i got bored from WA, plz sombedy tell me how to handle the inputs and outputs, my problem with WA is in all the problem i try to solve while i have right outputs...
2011-01-30 14:20:06 vikesh
I am getting correct answer for every test case on my machine but on submission WA is coming. Could anyone guide me in the right direction. values that i have checked are - 1,2.....,15,71,100.......correct result for all of them. Thanks in advance :)
2011-01-25 19:50:15 Prajeeth
Any tips for solving this using C++ ?
Source limit is kinda harsh for me
2011-01-23 21:56:23 Gustavo Souto H.Campelo(GEO SUL - PB)
Well...i'm still doing this program and i'm using vector
2011-01-10 23:29:58 Michal
Calculations are for ... But the code limit is not for tables...

Last edit: 2011-01-10 23:34:45
2011-01-08 14:31:43 avatar
How to ensure 1<=n<=100.
2010-12-15 01:51:10 shivang
I am getting correct answer for every test case on my machine but on submission WA is coming. Could anyone guide me in the right direction. values that i have checked are - 1,2.....,15,71,100.......correct result for all of them. Thanks in advance :)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.