Factorials of large numbers
Submissions: 6424   Accuracy:

30.94%

  Difficulty: Medium   Marks: 4

Given an integer, the task is to find factorial of the number.
 
Input:
The first line of input contains an integer T denoting the number of test cases.  
The first line of each test case is N,the number whose factorial is to be found
 
Output:
Print the factorial of the number in separate line.
 
Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 1000
 
Example:
Input

3
5
10
2
 
Output
120
3628800
2

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Abhishek Somani
Author: jain_rishabh


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.