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
top_gun007: 2016-05-24 04:09:41

learned something new by doing it in c

sk169: 2016-05-21 09:28:16

double data type in c++ gives the correct answer why is it giving wa?

eramangupta001: 2016-05-18 15:08:38

giving wa although my code is correct
can somebody help

mikeseeley06: 2016-05-15 00:10:07

Low hanging fruit with Java's BigInteger... =)

girishkumaral: 2016-05-02 02:24:58

I coded and tested in C++14 and it is working for 200! as well but source limit is not letting me submit :)

Last edit: 2016-05-06 06:12:34
rajat_mangla: 2016-03-31 13:14:25

getting runtime error as SIGABRT
what to do plz help !!! (code is in c++)

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


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