Large Factorial
Submissions: 1750   Accuracy:

29.93%

  Difficulty: Easy   Marks: 2

You are given a number N. You need to calculate its factorial. N can be very large.

Input:
The first line contains an integer 'T' denoting the total number of test cases. T testcases follow. Each testcase contains single line of input. The input for each testcase is a number N.

Output:
For each testcase, print the factorial of N.

Constraints:
1 <= T <= 449
0 <= N <= 448

Example:
Input:
2
1
20
Output:
1
2432902008176640000

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

Author: abhiraj26


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.