def IsPrime(n):
if n <= 1 or (n % 2 == 0 and n != 2):
return False
elif n ==
函数:判断是否为素数
最新推荐文章于 2023-03-08 07:39:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
def IsPrime(n):
if n <= 1 or (n % 2 == 0 and n != 2):
return False
elif n ==