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

Add some project euler solutions #3912

Open
wants to merge 7 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@p13lgst
Copy link

p13lgst commented Dec 4, 2018

Changes:

Added python solutions to some problems.

@arnavb

This comment has been minimized.

Copy link
Member

arnavb commented Jan 10, 2019

Don't forget to add a README for 11 like in the other Project Euler solutions.

Show resolved Hide resolved code/online_challenges/src/project_euler/problem_015/problem-015.py

if __name__ == '__main__':
abundants = set()
for i in range(12, 28123):

This comment has been minimized.

@arnavb

arnavb Jan 10, 2019

Member

Could you explain these numbers in a comment? Current they seem like magic constants.

@@ -0,0 +1,8 @@
if __name__ == '__main__':

total = 0

This comment has been minimized.

@arnavb

arnavb Jan 10, 2019

Member

Move all this into a main function.

total = 0

for i in range(1, 1001):
total += int(str(i**i)[-10:])

This comment has been minimized.

@arnavb

arnavb Jan 10, 2019

Member

Spaces around operators.

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