task08 fixed
This commit is contained in:
parent
cbb941187a
commit
f499b8eccd
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user