diff --git a/project_euler/problem_08/sol1.py b/project_euler/problem_08/sol1.py index 1cccdb8c85d6..ed9070cf37d0 100644 --- a/project_euler/problem_08/sol1.py +++ b/project_euler/problem_08/sol1.py @@ -50,7 +50,7 @@ 71636269561882670428252483600823257530420752963450""" -def solution(n): +def solution(n: str = N): """Find the thirteen adjacent digits in the 1000-digit number n that have the greatest product and returns it. @@ -68,4 +68,4 @@ def solution(n): if __name__ == "__main__": - print(solution(N)) + print(solution()) diff --git a/project_euler/problem_08/sol2.py b/project_euler/problem_08/sol2.py index 60bd8254f2c3..b7c6d2d27406 100644 --- a/project_euler/problem_08/sol2.py +++ b/project_euler/problem_08/sol2.py @@ -53,7 +53,7 @@ ) -def solution(n): +def solution(n=str(N)): """Find the thirteen adjacent digits in the 1000-digit number n that have the greatest product and returns it. @@ -69,4 +69,4 @@ def solution(n): if __name__ == "__main__": - print(solution(str(N))) + print(solution()) diff --git a/project_euler/problem_08/sol3.py b/project_euler/problem_08/sol3.py index f3e87c6d3436..6df61b944433 100644 --- a/project_euler/problem_08/sol3.py +++ b/project_euler/problem_08/sol3.py @@ -57,7 +57,7 @@ def streval(s: str) -> int: return ret -def solution(n: str) -> int: +def solution(n: str = N) -> int: """Find the thirteen adjacent digits in the 1000-digit number n that have the greatest product and returns it. @@ -79,4 +79,4 @@ def solution(n: str) -> int: if __name__ == "__main__": - print(solution(N)) + print(solution())