mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
10 lines
155 B
Python
10 lines
155 B
Python
|
a = 3
|
||
|
result = 0
|
||
|
while a < 1000:
|
||
|
if(a % 3 == 0 or a % 5 == 0):
|
||
|
result += a
|
||
|
elif(a % 15 == 0):
|
||
|
result -= a
|
||
|
a += 1
|
||
|
print(result)
|