To give you direction:
Example:
2
4
7
5
the output will be 2 it is the first prime number.
the code which you have sent did not the get the desired output
n = int(input())
for i in range(n):
m = int(input())
count = 0
for j in range(m):
if m % j == 0:
count++;
if count == 2:
print(m)
break
Comments
Leave a comment