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
aayushi24:
20170220 05:17:48
I'm getting correct answer at ideone but here it shows segmentation fault. Can anyone help me with the reason. 

p3arl_03:
20170216 11:29:26
Any other solution other than biginteger class? 

pushkars:
20170215 14:33:57
thanks akhil9093, biginteger class helped, Cheers 

akhil9093:
20170205 19:07:59
not that simple but my ac in one go ....but use biginteger class..that would really help..!!!otherwise best of luck 

kudesiaji:
20170118 13:39:11
I'm getting SIGSEGV error. Can anyone help me as to what could be the reason? 

cipher_097:
20170114 12:27:40
Use basic multiplication, read article on geeksforgeeks for further refrence. 

tawhidkuet04:
20170107 18:52:38
Basic Multiplication :) 

supercool2204:
20170103 07:31:39
Beware of :Your solution is too long for this problem, the limit is 2000 bytes! :D


k_359:
20170102 10:31:37
I'm getting correct answer on ideone but here it is showing wrong answer. :( 

psiphon_exe:
20170101 16:29:24
You need to solve this problem using basic multiplication. 
Added by:  adrian 
Date:  20040528 
Time limit:  1s 
Source limit:  2000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 