Last active
March 7, 2016 00:06
-
-
Save oldhill/227b5d66214d04f887ac to your computer and use it in GitHub Desktop.
euler.py
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
n = 100000000; | |
print '\nFinding sum of multiples of 3 and 5 below %d' % n | |
total = 0; | |
for i in xrange(0, n): | |
if i % 3 == 0 or i % 5 == 0: | |
total += i | |
print 'Result: %d' % total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment