📅  最后修改于: 2022-03-11 14:46:15.336000             🧑  作者: Mango
# math.isqrt() for Python version 3.8
def isPrime(n):
if n < 2: return False
for i in range(2, isqrt(n) + 1):
if n % 2 == 0:
return False
return True