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
SP.HARISH: 2013-09-04 08:40:03

Even if the code is perfectly correct, I always get wrong answer... Can someone help?

Raja CSE: 2013-09-03 14:47:53

i am submitting my c++ code and it says copliation error, and my code works perfectly in every case :S

Laura Romano: 2013-08-22 03:43:54

Why do I get "wrong answer" if my code works perfectly fine?

Karan Khanna: 2013-08-19 17:58:26

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

Gagandeep: 2013-08-19 05:36:29

hi! i have submitted in java,it gives wrong answer
but it works perfectly in every case

rohit kumar: 2013-07-30 17:56:08

ADMIN: plz check my code ID: 9751627
checked for all including 100!
getting wrong ans
plzz reply

alvaro: 2013-07-06 03:02:53

each containing a single integer n, 1<=n<=100.

arushi: 2013-07-03 16:39:24

wat if the user types 0 as one of the facts. are we supposed to give ans of other nos?

José Alvarez: 2013-06-21 13:44:57

I am submitting my c++ code and it says WRONG answer, and my code works perfectly in every case :S

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

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


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