FCTRL2 - Small factorials

You are asked to calculate factorials of some small positive integers.


An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.


For each integer n given at input, display a line with the value of n!


Sample input:

Sample output:


hide comments
vanshajchadha: 2017-07-21 08:02:09

why is my answer showing the factorial of large numbers as 0 when i am evaluating the factorial recursively.

rahulnair95: 2017-07-10 23:13:50

Im getting the correct answer for everything even 0,1 and 100. Why is it showing wrong answer ? :/

bobjarvis: 2017-07-03 21:22:31

vishwajeet404 - to keep people from putting in all the factorials from 1 to 100 as literals in an array and then just pulling them out of the array.

vishwajeet404: 2017-07-03 20:34:52

I had to fight tooth and nail to get the source code to be smaller than 2000B, why such a small limit?

shivltd: 2017-06-21 19:24:11

True happiness is completing this in c++ by creating your own big number range from scratch and no resources.
Problems people might encounter:
1. 100!(therefore the large number)
2. 0!(let it go)
3. Print endline after printing numbers. People face issues with that. Cheers. :")

tusharuppal: 2017-06-18 11:24:49

basic qn....AC in one go ;-)

bhawna_123: 2017-06-17 19:18:01

If u are a c/c++ programmer just read their tutorial of same problem.

leafbebop: 2017-06-05 13:51:04

Note for golang: There is a method called "MulRange" somewhere.

kartiks22: 2017-06-03 16:58:02

0.00s cpp

syamphanindra: 2017-05-25 14:13:58

what the hell i submitted the same solution in cpp it gave me WA thrice but only changing headers and converted to C it gives me AC!! why this happens

Added by:adrian
Time limit:1s
Source limit:2000B
Memory limit:1536MB
Cluster: Cube (Intel G860)