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
4 1 2 5 3
Sample output:
1 2 120 6
hide comments
pshishod2645:
20180118 17:44:01
to all who are wondering why it's giving wrong answer on spoj while not on their systems,n is upto 100,but even long long int can score atmost 20!(it's too big),use strings with your own multiply function for strings


prakash1108:
20171226 13:03:53
on ideone all output is correct but on spoj it is showing wrong answer.why?? 

roberttz:
20171212 22:02:38
Use string instead of numbers and make your own way to mulitiply strings 

charlles:
20171208 02:30:05
in C you need to build a function that work with int* from 0 to 9 to represent the 100! (which have more than 158 decimal places) Last edit: 20171208 15:25:14 

ashish_343:
20171126 22:15:03
how to reduce source code to 2000B in c?


harshit1729:
20171116 02:25:25
use boost in c++ 

wingsatfire:
20171102 19:05:04
Last edit: 20171218 19:40:56 

percy3538:
20171029 09:13:18
when i implement the code in python it is easy but when using c, even an long long unsigned int can not hold the number, what do i use to implement the code in c? 

vivek2188:
20171020 20:16:39
AC in single attempt :) NICE ONE 

zoyron:
20171015 12:27:57
my code runs perfectly on my computer but it shows wrong answer on spoj. Last edit: 20171015 12:28:15 
Added by:  adrian 
Date:  20040528 
Time limit:  1s 
Source limit:  2000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 