12 lines
169 B
Python
12 lines
169 B
Python
|
|
|
|
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))
|