This commit is contained in:
David Doblas Jiménez
2021-09-20 17:53:15 +02:00
parent ad6c4e4cd2
commit 7c8165d9c2
50 changed files with 2264 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
"""
Created on 28 Jun 2017
@author: David Doblas Jiménez
@email: daviddoji@pm.me
Solution for problem 7 of Project Euler
https://projecteuler.net/problem=7
"""
from utils import timeit, is_prime
@timeit("Problem 7")
def compute():
"""
# Statement
"""
number = 2
primeList = []
while len(primeList) < 10001:
if is_prime(number):
primeList.append(number)
number += 1
ans = primeList[len(primeList)-1]
return ans
if __name__ == "__main__":
print(f"Result for Problem 7: {compute()}")