Skip to content

Instantly share code, notes, and snippets.

@epl692
Created March 26, 2015 15:45
Show Gist options
  • Save epl692/a3724826f15b0d1758e1 to your computer and use it in GitHub Desktop.
Save epl692/a3724826f15b0d1758e1 to your computer and use it in GitHub Desktop.
Project Euler Project 1
sum35 = []
target = 1000
for i in range(0, target):
sum35.append(0)
for i in range(0, target):
if i*3 < target:
sum35[i*3] = i*3
if i*5 < target:
sum35[i*5] = i*5
print sum(sum35)
@epl692
Copy link
Author

epl692 commented Mar 26, 2015

Maybe not the fastest or light on memory, but effective!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment