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
Nenu Anda Roxana: 2011-03-17 09:45:07

I am getting WA but my program works on my machine. How to handle the output???

Qianli Ma: 2011-02-22 21:06:55

Should not allow python3 for this problem...

sayed khalaf sayed: 2011-02-07 20:03:21

Why WA?? i have right outputs. please how to handle the output..

Ahmed Atif Salah: 2011-02-07 19:35:45

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...

vikesh: 2011-01-30 14:20:06

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 :)

Prajeeth: 2011-01-25 19:50:15

Any tips for solving this using C++ ?
Source limit is kinda harsh for me

Gustavo Souto H.Campelo(GEO SUL - PB): 2011-01-23 21:56:23

Well...i'm still doing this program and i'm using vector

Michal: 2011-01-10 23:29:58

Calculations are for ... But the code limit is not for tables...

Last edit: 2011-01-10 23:34:45
avatar: 2011-01-08 14:31:43

How to ensure 1<=n<=100.

shivang: 2010-12-15 01:51:10

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 :)


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