first commit

This commit is contained in:
=
2024-02-07 15:06:50 +01:00
commit af02e453c1
55 changed files with 2166 additions and 0 deletions

13
p7/solution.py Normal file
View 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))