Skip to content

Instantly share code, notes, and snippets.

@oldhill
Last active March 7, 2016 00:06
Show Gist options
  • Save oldhill/227b5d66214d04f887ac to your computer and use it in GitHub Desktop.
Save oldhill/227b5d66214d04f887ac to your computer and use it in GitHub Desktop.
euler.py
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