跳到正文

题解

Python3 一行代码系列——判断一个数是否是质数

chenyuan3约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年4月12日
收录
2025年12月12日
更新
2026年11月19日
篇幅
约 1 分钟

版本

  1. v1当前
Python
print((lambda x: x >= 2 and all(map(lambda y: x % y != 0, range(2, int(x ** 0.5) + 1))))(int(input())))
原文