Unified numbers and output

This commit is contained in:
2023-04-01 15:57:07 +02:00
parent e004055fb3
commit 220a742b6b
50 changed files with 188 additions and 179 deletions

View File

@@ -5,7 +5,7 @@ Created on 28 Abr 2017
@author: David Doblas Jiménez
@email: daviddoji@pm.me
Solution for problem 8 of Project Euler
Solution for problem 008 of Project Euler
https://projecteuler.net/problem=8
"""
@@ -27,7 +27,7 @@ def sliding_window(iterable, n):
yield tuple(window)
@timeit("Problem 8")
@timeit("Problem 008")
def compute():
"""
The four adjacent digits in the 1000-digit number that have the
@@ -61,6 +61,7 @@ def compute():
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450
"""
num = NUM.replace("\n", "").replace(" ", "")
adjacent_digits = 13
ans = 0
@@ -75,4 +76,4 @@ def compute():
if __name__ == "__main__":
print(f"Result for Problem 8 is {compute()}")
print(f"Result for Problem 008: {compute()}")