All Tracks Data Structures Hash Tables Basics of Hash Tables Problem

Factorial Game
/
No tags
Problem
Editorial
Analytics

You are given Q querries and in each query you are given a  number N, Print its factorial under modulo 1000000007.

Constraints:

 1 <= Q <= 10^5

10 points:  1<= N <= 12

40 points: 1<= N <= 100

100 points: 1<= N <= 10^5

Input -> 

  • First Line of Input contains an integer Q which denotes the number of query.
  • Each query contains a single integer N.

Output ->For each query, output a single integer M which is your answer.

SAMPLE INPUT
3
5
2
6
SAMPLE OUTPUT
120
2
720
Explanation

Factorial of 5 is calculated as 1 x 2 X 3 X 4 X 5 = 120.

Read more about factorial at this link

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

Best Submission

Similar Problems

Contributors

Initializing Code Editor...
Notifications
View All Notifications

?