11-10-2015, 07:48 PM
So I found myself installing Python and Sublime Text again to revive my Project Euler account. Project one solution:
Pretty tiny for me actually! Only 12 lines of code! I bet you can do it with less, but that's actually fine for me!
Code:
x = 1
sol = 0
while x < 1000:
m = x % 3
if m == 0:
sol += x
else:
m = x % 5
if m == 0:
sol += x
x += 1
print(sol)