Factorial

4

5 votes
Very-Easy
Problem

Given an integer N, print the factorial of the N (mod 109+7).

Input:
First line contains one integer, T, number of test cases.
Each test case contains one integer, N.

Output:
For each test case you need to print the factorial of N (mod 109+7).

Constraints:
1T105
0N105

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

?