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
entente888: 2020-07-22 18:18:26

its name is the biggest troll lol
small factorial but very big answer

uttsav1998: 2020-07-07 12:08:44

I like molesting young boys

Last edit: 2020-07-07 15:44:08
amanrathod007: 2020-06-29 09:34:19

For c++ users :if you want to learn good concept then avoid boost library.
Think if you can use string for big numbers

dileep_27: 2020-06-08 13:13:44

Last edit: 2020-06-08 13:14:25
hello_1234: 2020-06-04 17:43:53

My answer is totally correct ans it's saying wrong answer.WHy!!!!!!!!!!!!

cre_jug_07: 2020-06-01 20:26:24

define a function and map every input to it in Python!

puthal_101: 2020-05-25 13:07:23

You must should know, how to add and multiple big numbers using strings

Last edit: 2020-05-25 13:09:18
muf_f1n: 2020-05-24 20:36:20

Don't use any library functions in this function... that's the goal of this problem

shreya_nawani: 2020-05-21 21:37:22

try bigint for java or c++

tezu_singh: 2020-05-20 05:11:30

use boost library ,learn it from tutorial point and do simple factorial

Last edit: 2020-05-20 05:12:38

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