Factorials of large numbers
Submissions: 7559   Accuracy:

34.7%

  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


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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

to report an issue on this page.