# DCP-27: Is It Prime? Back to All Problems

Beginner Math > Basic Math

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. Below is a chart of numbers up to 100 and yellow marked numbers are prime numbers. ![primes][1] We want you to write a program that can check whether a given input number is prime number or not. All number will be in the range **0 <= N <=10000**. Input: ------ Input starts with an integer **T (≤ 5000)**, denoting the number of test cases. Each test case will have one line containing the number to test. Output: ------- For each test case, print either “Yes” (without quotes) or “No” (without quotes). If the input number is prime number then print “Yes”, otherwise print “No”. Please check sample input/output to get an idea. Sample Input ------------ 3 97 55 1000 Sample Output ------------- Yes No No [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/8a279e47-68b0-c989-90c5-08d2e286f36c_b929388111cd4762bbb4ee94dc73332d_W650xH487.jpg

### Problem Limits

 Language Time Limit (seconds) C/C++ 1.00 Java 3.00 C# 3.00 PHP 3.00

# 186/582

Solve/Submission

### Ranking

# User Language Timing
01 nurakib Cpp 0.00s
02 moshiur_cse15 Cpp 0.00s
03 Indro_BU Cpp 0.00s
04 Masum_ice Cpp 0.00s
05 JubayerSohel Cpp 0.00s
06 Ahb_arif Cpp 0.00s
07 NightTrain_404 Cpp 0.00s
08 jayed_al_hasan Cpp 0.00s
09 lazyfahim Cpp 0.00s
10 terminator_c Cpp 0.00s
11 badhansen123 Cpp 0.01s
12 gulzar Cpp 0.01s
13 maxhasan Cpp 0.01s
14 gazi93 Cpp 0.01s
15 Anikcsejnu Cpp 0.01s
16 golapraj Cpp 0.01s
17 seyedssz Cpp 0.01s
18 Avijeet Cpp 0.01s
19 Abdullah2222 Cpp 0.01s
20 Ashish972 Cpp 0.01s
21 rayhan50001 Cpp 0.01s
22 Ronysplanet Cpp 0.01s
23 concentrate Cpp 0.01s
24 Salty_Coder Cpp 0.01s
25 The_Viper Cpp 0.01s
26 return_SS Cpp 0.01s
27 Sharif_42 Cpp 0.02s
28 ronok_cse Cpp 0.02s
29 MarufAhmed Cpp 0.02s
30 Mubeen Cpp 0.02s
31 ishrafislam2727 Cpp 0.02s
32 rabib Cpp 0.03s
33 Mehedi07 Cpp 0.03s
34 joy25896 Cpp 0.05s
35 Bishal_G CSharp 0.05s
36 Sojal Cpp 0.05s
37 feodorv Cpp 0.06s
38 robin_aust Cpp 0.07s
39 tusharali Cpp 0.07s
40 Sabbir2015 Cpp 0.07s
41 mahrahat Cpp 0.07s
42 Najat Cpp 0.07s
43 akram Cpp 0.07s
44 anis Cpp 0.07s
45 Dinar Cpp 0.07s
46 mdtameemkhan Cpp 0.07s
47 xb_saykat Cpp 0.08s
48 Shadman87 Cpp 0.08s
49 Monira_Heya Cpp 0.08s
50 Brokenlog Cpp 0.08s
Feedback