diff --git a/project_euler/problem_078/sol1.py b/project_euler/problem_078/sol1.py index f92cf0f40..7e5938c4c 100644 --- a/project_euler/problem_078/sol1.py +++ b/project_euler/problem_078/sol1.py @@ -21,6 +21,12 @@ import itertools def solution(number: int = 1000000) -> int: """ + >>> solution(1) + 1 + + >>> solution(9) + 14 + >>> solution() 55374 """ @@ -34,6 +40,7 @@ def solution(number: int = 1000000) -> int: if index > i: break item += partitions[i - index] * sign + item %= number index += j if index > i: break