DCP-208: Distinct Prime Back to All Problems

Easy Math > Number Theory

You’re given a positive integer **N**, you have to tell all distinct prime factor of this number is consecutive prime or not! Input : ------- **T<= 25002** number of test case at first line, next T line contain a positive integer **N<=10^14** Output: ------- For each test case print a line “Yes” if all distinct prime factor of N is consecutive prime, “No” otherwise. If N does not have any prime factor print “No”. Sample input: ------------- 7 64 100 11 99985880498411 100000000000000 1728 800 Sample Output: -------------- Yes No Yes Yes No Yes No

Problem Limits

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

126/550

Solve/Submission

Ranking

# User Language Timing
01 mihassan Cpp14 0.23s
02 Morass Cpp14 0.87s
03 I_See_You Cpp 1.28s
04 nmunim Cpp14 1.91s
05 Baka_Raffi Cpp 2.94s
06 tariqiitju Cpp14 2.96s
07 monir769 Cpp14 3.07s
08 ksohan Cpp14 3.08s
09 Rajan_sust Cpp14 3.22s
10 feodorv Cpp14 3.24s
12 haasib Cpp 3.34s
13 Rajib_119 Cpp14 3.38s
14 sumon23 Cpp14 3.41s
15 BishalG Cpp14 3.45s
16 MazedRupok Cpp14 3.47s
18 siamcr7 Cpp 3.51s
19 KIRIN_36 Cpp14 3.63s
20 anowar1112 Cpp14 3.70s
21 emrul Cpp14 3.85s
22 Masum_ice Cpp14 3.90s
23 Reayz Cpp14 4.00s
25 nasif2587 Cpp14 4.04s
26 alhelal_cse Cpp14 4.06s
28 ash12 Cpp14 4.08s
29 RandyWaterhouse Cpp 4.11s
30 abdulmukit Cpp 4.12s
31 sakib_muhit Cpp 4.21s
32 mahmud2690 Cpp14 4.22s
34 rayhan50001 Cpp14 4.37s
35 aarifshuvo Cpp 4.37s
36 sidratul_tutul Cpp14 4.44s
37 ssavi Cpp14 4.74s
38 swapnil Cpp14 4.76s
39 Tahmid Cpp14 4.77s
40 template Cpp14 4.85s
42 sazal_dev Cpp14 5.13s
43 dot_0 Cpp14 5.15s
44 sayedgkm Cpp14 5.23s
45 fsshakkhor Cpp14 5.33s
46 shaft Cpp14 5.40s
47 mamun4122 Cpp14 5.45s
48 SakibAlamin Cpp 5.47s
49 Zeronfinity Cpp14 5.50s
50 aseem_cu Cpp14 5.63s
Feedback