专题博客链接
[题解]浙大Python PTA课后习题博客记录(Python)
原题题目
代码实现
import math
numbers = int(input());count = 0
while count<numbers:
judge = int(input())
if(judge == 1): print("No");count+=1
else:
temp = int(math.sqrt(judge));flag = 0
for i in range(2,temp+1):
if(judge % i == 0):
flag = 1;break;
if(flag == 1): print("No")
else:print("Yes")
count+=1