import math n = int(input(‘Input an integer:‘)) m = int(math.sqrt(n) + 1) for i in range(2, m): if n % i == 0: print(‘No‘) break else: print(‘Yes‘) #输出结果 #Input an integer:23 #Yes
标签:range imp input 代码 port pos gpo bre color
import math n = int(input(‘Input an integer:‘)) m = int(math.sqrt(n) + 1) for i in range(2, m): if n % i == 0: print(‘No‘) break else: print(‘Yes‘) #输出结果 #Input an integer:23 #Yes
标签:range imp input 代码 port pos gpo bre color
原文地址:https://www.cnblogs.com/chuangming/p/8467690.html