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 Setter:

Sifat Rabbi

Please login to submit solution to this problem.

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

Problem Stats

53/130

Solve/Submission

Ranking

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

Your feedback is our precious!



Or call +88 02 9853138 for support