Created
October 13, 2011 00:47
-
-
Save larrycai/1283057 to your computer and use it in GitHub Desktop.
solution for problem 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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