diff --git a/labs02/task08.py b/labs02/task08.py index 252b10d..0100ab5 100644 --- a/labs02/task08.py +++ b/labs02/task08.py @@ -7,7 +7,12 @@ przez 3 lub 5 mniejszych niż n. """ def sum_div35(n): - pass + suma = 0 + for i in range(n): + if (i+1) < n and (i+1)%3 == 0 and (i+1)%5 == 0: + suma += (i+1) + + return suma def tests(f): inputs = [[10], [100], [3845]]