# DCP-519: Dealing with factorial factors Back to All Problems

Easy Math > Number Theory

Jimmy is late in his class today. His class teacher, Mr. Adnan is a very strict person. He gives Jimmy a problem to solve. Mr. Adnan does not agree to allow Jimmy in his class until he can solve the problem. The problem has the following steps : i. Mr. Adnan gives him a number **N** and Jimmy has to find the **Nth Prime Number**. ii. Then Jimmy adds 1 with this prime number. iii. At last he should calculate all the **Prime Factors** of the factorial of the new number. For example, let us discuss about the first testcase. Here, N=2. As 2nd prime number is 3, we can add 1 with 3, then 3+1=4. Now, 4! =24. If we prime factorize 24, we can see the form, **24 = 2^3 * 3^1**. So the output is 2 and 3 for this case. Input: ------ Input starts with a number **T**, denoting the total number of testcases (**1 ≤ T ≤ 200**). Each next **T** line contains a number **N** (**1 ≤ N ≤ 200**), which has been already defined in the description. Output: ------- For each testcase, output the expected value(s) wanted in the description with testcase numbers. Follow the **Sample Output** section for better clarification. Sample Input ------------ 3 2 3 5 Sample Output ------------- Caso 1 -> 2 3 Caso 2 -> 2 3 5 Caso 3 -> 2 3 5 7 11

### Problem Limits

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

# 143/446

Solve/Submission

### Ranking

# User Language Timing
01 astinaam Cpp 0.00s
02 shaeekh Cpp14 0.00s
03 mhiceiuk Cpp 0.00s
05 pulak_ict_mbstu Cpp14 0.00s
06 belal_mbstu Cpp14 0.00s
07 Reayz Cpp 0.00s
08 mohibur Cpp 0.00s
09 feodorv C 0.00s
10 Chayti_Saha98 Cpp 0.00s
11 Bruteforcekid Cpp14 0.00s
12 mh755628 Cpp 0.00s
13 Ayon_neub Cpp 0.00s
14 Riz1ahmed Cpp 0.00s
15 pencil Cpp14 0.00s
16 prateepm Cpp14 0.00s
17 Limon_88 Cpp 0.00s
18 ehsan_sshuvo96 Cpp 0.00s
19 sourav_malo C 0.00s
20 mdrifat Cpp 0.00s
21 Shiam7777777 Cpp14 0.00s
22 imnirob15 Cpp14 0.01s
23 Noshin_1703086 C 0.01s
24 Arnob114348 C 0.01s
25 Robin008 Cpp 0.01s
26 Nuwaisir Cpp 0.01s
27 shoumo Cpp14 0.01s
28 Methun Cpp 0.01s
29 spectro30 Cpp14 0.01s
30 dysnomia C 0.01s
31 tahsin_protik C 0.01s
32 Towfiq379 Cpp 0.01s
34 acwatlerte Cpp 0.01s
35 KM_Muntasir Cpp14 0.01s
36 kabbya Cpp 0.01s
38 monir_18 Cpp 0.01s
39 asif04 Cpp14 0.01s
40 Ataur Cpp 0.01s
41 TarikulCSE Cpp14 0.01s
42 Not_Found0001 Cpp 0.01s
43 monir769 Cpp14 0.01s
44 DynamicOvi Cpp 0.01s
45 Bisnu039 Cpp 0.01s
46 milon019 Cpp 0.01s
47 nasib_mbstu Cpp 0.01s