1 parent a94c621 commit 965b1ffCopy full SHA for 965b1ff
1 file changed
project_euler/problem_078/sol1.py
@@ -21,6 +21,12 @@
21
22
def solution(number: int = 1000000) -> int:
23
"""
24
+ >>> solution(1)
25
+ 1
26
+
27
+ >>> solution(9)
28
+ 14
29
30
>>> solution()
31
55374
32
@@ -34,6 +40,7 @@ def solution(number: int = 1000000) -> int:
34
40
if index > i:
35
41
break
36
42
item += partitions[i - index] * sign
43
+ item %= number
37
44
index += j
38
45
39
46
0 commit comments