task08 fixed

This commit is contained in:
s45147 2017-12-16 20:02:01 +01:00
parent cbb941187a
commit f499b8eccd

View File

@ -9,8 +9,8 @@ przez 3 lub 5 mniejszych niż n.
def sum_div35(n): def sum_div35(n):
suma = 0 suma = 0
for i in range(n): for i in range(n):
if (i+1) < n and (i+1)%3 == 0 and (i+1)%5 == 0: if i%3 == 0 or i%5 == 0:
suma += (i+1) suma += i
return suma return suma