You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
135 B
14 lines
135 B
9 years ago
|
import math
|
||
|
|
||
|
|
||
|
sum = 0
|
||
|
|
||
|
|
||
|
for x in range(0, 1000):
|
||
|
if x % 3 == 0:
|
||
|
sum += x
|
||
|
elif x % 5 == 0:
|
||
|
sum += x
|
||
|
|
||
|
print(sum)
|