Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
68913 | 胡海峰老师 | 判断素数 | Python3 | Accepted | 33 MS | 3776 KB | 280 | 2024-03-27 22:04:02 |
import math def is_prime(n): #2- n-1 if n==1: return False for x in range(2,int(math.sqrt(n))+1): if n%x==0: return False return True m = int(input()) res = is_prime(m) if res== True: print("Yes") else: print("No")