commit 295963d4c768de706c411f302bcb631bc2a5149d
parent 8d23e4218ac93379ff95506c0a31eccd90b33bcc
Author: therealFIGBERT <figbertwelner@gmail.com>
Date: Sat, 25 Jan 2020 12:39:21 -0800
Reduce runtime of solution to problem 7
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/problem007.py b/problem007.py
@@ -19,10 +19,10 @@ def sieveOfEratosthenes(limit):
return [p for p in range(limit + 1) if prime[p]]
def search():
- searchRange = 100
+ searchRange = 1000
returnValue = sieveOfEratosthenes(searchRange)
while len(returnValue) < 10001:
- searchRange += 100
+ searchRange += 1000
returnValue = sieveOfEratosthenes(searchRange)
print(returnValue[10000])