用户输出
3
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#63380 | #105. zxh的继承顺位 | Accepted | 100 | 3369 ms | 137396 K | Python 3 / 464 B | 强基(数学)001 吴沂钊 | 2021-07-26 17:15:14 |
# 真的不是勃艮(gen)第吗
n = int(input())
sup = 1299709
sqrt_sup = 1140
nums = [False, False] + [True for i in range(sup - 1)]
for j in range(4, sup + 1, 2):
nums[j] = False
for i in range(3, sqrt_sup + 1, 2):
if nums[i]:
for j in range(i * i, sup + 1, i * 2):
nums[j] = False
count = 0
i = 2
while i <= sup:
if nums[i]:
count += 1
if count == n:
print(i)
break
i += 1