Calculate Factorial - 1

2

1 votes
Problem

For a total of T test case, you are given an integer N, and you are asked to print its factorial modulo ( 109 + 7) .

Recall that factorial is the product of integers from 1 till n.

Input:-

First line contains the number of test cases.

Second line contains the integer N.

Output:-

Print the factorial of N modulo ( 109 + 7).

Constraints:-

1 <= T <= 100

1 <= N <= 50000

 

Sample Input
5
1
2
3
4
5
Sample Output
1
2
6
24
120
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?