Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit 05fc3da

Browse files
dhruvs009blakeembrey
authored andcommitted
Update multiples-of-3-and-5.py (#187)
1 parent eab8af2 commit 05fc3da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

solutions/python/multiples-of-3-and-5.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ def getSumOfMultiples(multiples, limit):
1717
result += sign * getSumOfMultiple(reduce(mul, x, 1), limit)
1818
sign *= -1
1919
return result
20+
21+
def getSumOfMultiples():
22+
count=0
23+
for i in range(1000):
24+
if i%3==0 or i%5==0:
25+
count+=i
26+
return count

0 commit comments

Comments
 (0)