Skip to content

fixed solution 4 of problem 1 #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixed solution 4 of problem 1
  • Loading branch information
Christian Bender committed Apr 15, 2018
commit 10b0a40b2eae2e986cffd6d4760ada01a6ee99b1
8 changes: 3 additions & 5 deletions Project Euler/Problem 01/sol4.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def mulitples(limit):
if (result < limit):
zmulti.append(result)
temp += 1
continue
else:
temp = 1
break
Expand All @@ -18,15 +17,14 @@ def mulitples(limit):
if (result < limit):
xmulti.append(result)
temp += 1
continue
else:
temp = 1
break
return (sum(zmulti) + sum(xmulti))
collection = list(set(xmulti+zmulti))
return (sum(collection))






print (mulitples(100))
print (mulitples(1000))