def isprime(x):
flag = 0
for k in range(2,i):
if i%k == 0:
flag=0
break
else:
flag = 1
if flag == 1:
return 'Yes'
else:
return 'No'
N = int(input())
li = []
for i in range(N):
li.append(int(input()))
for i in li:
print(isprime(i))
第四章 7-11 判断素数
最新推荐文章于 2023-11-19 16:28:51 发布