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
Input: 4 1 2 5 3 Output: 1 2 120 6
hide comments
chiflowmaxx:
2015-08-17 13:26:32
how to handle large numbers in c++??
|
|
shantanu tripathi:
2015-08-14 06:46:42
this is very easy in c++ ... @frankitox |
|
frankitox:
2015-08-04 05:23:09
This problem It's only interesting only for languages that don't automatically handle big numbers. I tried to do it in C, but didn't work out how to print the number. Then I change to Ruby, and it take only a couple of lines. |
|
whatisyourname:
2015-07-29 10:08:16
For WA people: the tester checks for 0! even though this shouldn't happen by the problem statement, and only accepts the WRONG answer 0!=0. |
|
karthik1997:
2015-07-22 19:43:49
just use string and :D 0.00s no algo nothing used |
|
chin:
2015-07-03 12:52:48
My 50th!!...:D |
|
BadeMeow:
2015-07-01 13:58:28
Please check my submissions don't know why I am getting a WA.
|
|
Vars:
2015-06-23 19:44:58
easy after learning java..
|
|
tongfeifan:
2015-06-08 22:15:54
This problem will be extremely easy, if u code in python. |
|
ruimgf:
2015-05-29 19:03:59
Can i use gmp lib from c language?
|
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |