Skip to content

Instantly share code, notes, and snippets.

@larrycai
Created October 13, 2011 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larrycai/1283057 to your computer and use it in GitHub Desktop.
Save larrycai/1283057 to your computer and use it in GitHub Desktop.
solution for problem 1
# http://projecteuler.net/problem=1
total = 0;
for i in range(1,1000):
if (i % 3 == 0) or (i % 5 ==0):
# print i;
total += i;
print "the sum of all the multiples of 3 or 5 below 1000: " , total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment