Skip to content

Instantly share code, notes, and snippets.

@daGrevis
Created November 23, 2011 19:56
Show Gist options
  • Save daGrevis/1389717 to your computer and use it in GitHub Desktop.
Save daGrevis/1389717 to your computer and use it in GitHub Desktop.
Solution to problem #1 (ProjectEuler.net) in Python
numbers = range(1, 999 + 1)
result = 0
for that in numbers:
if that % 3 == 0 or that % 5 ==0:
result += that
print result # Prints '233168'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment