# DCP-183: Orthi and Factorial - II Back to All Problems

Easy Math > Basic Math

Little Orthi loves math very much. Now she is working with factorial. But she is too young to find factorial. So she need a program which will calculate the factorial of a number. Your task is to write that program. **Use faster technique to avoid TLE** Input: ------ Input starts with an integer **T (1<=2000)**, denoting the number of test cases. Each case contains an integer **N (0 ≤ N ≤ 10000)** denoting the number of which the factorial Orthi wants to know. Output: ------- For each case of input, output in a line the Case number and the factorial of that number. As the number can be huge print the number modulo 100000007. Sample Input ------------ 3 4 5 6 Sample Output ------------- Case 1: 24 Case 2: 120 Case 3: 720

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 3.00 Go 3.00 Java 3.00 JavaScript 3.00 Objective-C 3.00 Perl 3.00 PHP 3.00 Python 3.00 Python3 3.00 Ruby 3.00 VB.Net 3.00

# 52/129

Solve/Submission

### Ranking

# User Language Timing
01 ash12 Cpp14 0.00s
02 haasib Cpp14 0.00s
03 rayhan50001 Cpp14 0.00s
04 seyedssz Cpp14 0.00s
05 terminator_c Cpp14 0.00s
06 ammasum Cpp 0.00s
07 SakibAlamin Cpp14 0.00s
09 hmtanbir Cpp14 0.00s
10 abdulmukit Cpp 0.00s
11 mamun02inf Cpp 0.00s
12 Morass Cpp14 0.00s
13 souravahmed C 0.00s
14 Robbinb1993 Cpp14 0.00s
15 zubayerhossain Cpp 0.01s
16 feodorv Cpp14 0.01s
17 AlaminJust Cpp14 0.01s
18 anowar1112 Cpp14 0.01s
20 KIRIN_36 Cpp14 0.01s
21 pulak_ict_mbstu Cpp 0.01s
22 Anubis Cpp14 0.01s
23 mahbub07 Cpp 0.01s
24 emrul Cpp14 0.01s
25 tariqiitju Cpp 0.01s
26 prodipdatta7 Cpp14 0.01s
27 duronto20 Cpp 0.01s
28 MAHRahat Cpp14 0.01s
29 mahmud2690 Cpp14 0.02s
30 shishir09 Cpp14 0.03s
31 RandyWaterhouse Python3 0.05s
32 10102020 Cpp 0.16s
33 rabbicse Cpp 0.27s
34 absa1am Cpp14 0.27s
35 Ansarul_14 Cpp14 0.27s
36 afzalul Cpp14 0.28s
37 mrinmoi Cpp 0.28s
38 rockersabbir Cpp 0.28s