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
phanvanson: 2016-03-25 19:27:14

BigInteger in java -> ok :D

Last edit: 2016-03-25 19:28:06
eternally_cute: 2016-03-24 19:42:34

getting wa,even when the code does what is asked. :(

kosta_1: 2016-03-18 19:12:58

my answer is right, but it says it isnt??
what dafuq is happening?

parull: 2016-02-29 12:49:52

Giving wrong answer. Mine's right though.... :(

azam_9: 2016-02-23 14:32:53

0.0 in c...<3

rahul_verma: 2016-02-17 15:51:30

yes!!!! done It :p

imshubhamk: 2016-02-09 17:37:08

made my own big int even can calculate 1000! !!!!!!!!!!!!!!!!!!!!
feeling proud.....

jcap: 2016-02-05 07:58:18

Proud to be one of the warriors who rolled their own C++ big-number to solve this problem.

harshgupta007: 2016-02-04 19:31:52

AC in one go using JAVA!!!! 0.12sec

lochnesscookie: 2016-02-01 02:29:29

For those that are creating their own "biginteger" objects or structs or whatever, make sure your display methods print a line after printing all the digits. (that might be causing wrong answers)


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