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

hide comments
Retired: 2013-06-03 17:30:12

Yeah!!! My first prob in python :D..Too easy..

SASI : 2013-05-31 05:19:11

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

Jorian: 2013-05-28 01:34:53

i'm really stunned when spoj compiler is accepting my code. Thankful to python!.....

Globussoft: 2013-05-15 16:52:59

In my system in C# code is working fine.but here it shows compilation error.Is anybody
knows about this issue.

Gitesh: 2013-05-15 10:36:01

@all
Java can also be used pretty easily,
ever heard of BigInteger eh?? :P

Rishabh Dugar: 2013-05-15 09:29:00

m nt getting restult for 99,,which dat type to use?? used double long...

Ashutosh Pandey: 2013-04-17 07:48:19

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

ওয়াসী (Wasi): 2013-04-01 13:06:30

Thanks to python. Its just too easy :P

Ganesh Hegde: 2013-03-27 19:45:09

meh. used python :p

Robin Halder: 2013-03-16 07:19:24

http://pastebin.com/*******

Getting WA why.. ?? Help me..

--ans--> The forum is made for those questions.

Last edit: 2013-03-16 08:44:04

Added by:adrian
Date:2004-05-28
Time limit:1s
Source limit:2000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All