first commit
This commit is contained in:
BIN
p7/__pycache__/solution.cpython-37.pyc
Normal file
BIN
p7/__pycache__/solution.cpython-37.pyc
Normal file
Binary file not shown.
13
p7/solution.py
Normal file
13
p7/solution.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from ctypes import util
|
||||
from math import floor, sqrt
|
||||
from util.sieve import sieve, extend_sieve
|
||||
|
||||
def solution(n):
|
||||
sieve_max = n
|
||||
p, s = sieve(sieve_max)
|
||||
while len(p) < n:
|
||||
sieve_max += n
|
||||
p, s = extend_sieve(sieve_max, s)
|
||||
return p[n-1]
|
||||
|
||||
print(solution(10001))
|
||||
Reference in New Issue
Block a user