Ответ:
def f(k):
i = 0
prime = [True] * 1300000
prime[0] = prime[1] = False
while k > 0:
i += 1
if not prime[i]:
continue
for j in range(i * i, 1300000, i):
prime[j] = False
k -= 1
return i
print(f(int(input())))
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
def f(k):
i = 0
prime = [True] * 1300000
prime[0] = prime[1] = False
while k > 0:
i += 1
if not prime[i]:
continue
for j in range(i * i, 1300000, i):
prime[j] = False
k -= 1
return i
print(f(int(input())))
Объяснение: