Skip to content

Commit 9fa20b3

Browse files
committed
Added test case for negative input.
1 parent 8c4c820 commit 9fa20b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

project_euler/problem_01/sol1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def solution(n):
2121
23
2222
>>> solution(600)
2323
83700
24+
>>> solution(-7)
25+
0
2426
"""
2527

2628
return sum([e for e in range(3, n) if e % 3 == 0 or e % 5 == 0])

0 commit comments

Comments
 (0)