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

52/129

Solve/Submission

Ranking

# User Language Timing
01 rayhan50001 Cpp14 0.00s
02 terminator_c Cpp14 0.00s
03 seyedssz Cpp14 0.00s
04 ash12 Cpp14 0.00s
05 haasib Cpp14 0.00s
06 Morass Cpp14 0.00s
07 hmtanbir Cpp14 0.00s
08 SakibAlamin Cpp14 0.00s
09 abdulmukit Cpp 0.00s
10 Robbinb1993 Cpp14 0.00s
11 souravahmed C 0.00s
12 mamun02inf Cpp 0.00s
13 ammasum Cpp 0.00s
14 smriad Cpp 0.00s
15 pulak_ict_mbstu Cpp 0.01s
16 tariqiitju Cpp 0.01s
17 feodorv Cpp14 0.01s
18 zubayerhossain Cpp 0.01s
19 anowar1112 Cpp14 0.01s
20 emrul Cpp14 0.01s
21 KIRIN_36 Cpp14 0.01s
22 MAHRahat Cpp14 0.01s
23 duronto20 Cpp 0.01s
24 mahbub07 Cpp 0.01s
25 prodipdatta7 Cpp14 0.01s
26 AlaminJust Cpp14 0.01s
27 Anubis Cpp14 0.01s
28 sadia2427 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 Ansarul_14 Cpp14 0.27s
35 absa1am Cpp14 0.27s
36 afzalul Cpp14 0.28s
37 mrinmoi Cpp 0.28s
38 rockersabbir Cpp 0.28s
39 saeefad Cpp 0.28s
40 deder Cpp14 0.39s
41 Khayrul_34 Cpp14 0.58s
42 Logic_Hunter Java 0.67s
43 devcoder Java 0.67s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support