Created
March 26, 2015 15:45
-
-
Save epl692/a3724826f15b0d1758e1 to your computer and use it in GitHub Desktop.
Project Euler Project 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
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe not the fastest or light on memory, but effective!