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.
12 lines
169 B
12 lines
169 B
2 years ago
|
|
||
|
|
||
|
threes = []
|
||
|
fives = []
|
||
|
|
||
|
for i in range(1000):
|
||
|
if i % 3 == 0:
|
||
|
threes.append(i)
|
||
|
elif i % 5 == 0:
|
||
|
fives.append(i)
|
||
|
print(sum(threes) + sum(fives))
|