Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd more solutions to Project Euler problems #2695
Comments
UPDATE: If possible only submit solution to problems which doesn't exists in this repository.As of now, we are only accepting PRs with one algorithm in it as it is easier to review one file at a time. Anyone reading this can join and open PRs as well. We accept multiple solutions to a problem as everyone has their own approach to problem-solving but it should be their own and unique compared to other solutions. NOTE: Please give us time to review as there are so many to go through. If possible submit one PR at a time and when that is merged provided it passes all the automatic tests, you can submit another PR. Also, please read the contributing guidelines before opening a PR. One step at a time Please follow the points mentioned below regarding Project Euler solutions. This is done to maintain consistency throughout the directory and to run this script which checks all the solutions:
Example: def solution(): # function without any parameters
# ... calculations ...
return answer
# If we call this function without passing any arguments, it will return the answer
solution() # -> answer
def solution(input: "default value"): # function with parameters having default value
# ... calculations ...
return answer
# If we call this function without passing any arguments, it will return the answer
solution() # -> answerFor problems which needs to work with large data, put the data in a separate file and import it. |
|
Where can I get the problems from? |
|
https://projecteuler.net/ |
|
Thanks it helped |
Added problem_38 folder with solution file sol.py. TheAlgorithms#2695
Added problem_38 in project_euler TheAlgorithms#2695
|
I would love to join and contribute. Project Euler was always fun to me back in college :) |
|
Hi, |
|
@berry-thawson Please refer to problem_54#L367-L369 import os # with other imports
...
def solution():
script_dir = os.path.abspath(os.path.dirname(__file__))
<file_name_without_extension> = os.path.join(script_dir, "<file_name>")
with open(<file_name_without_extension> , "r") as file_hand:
# ... your code ...
I hope this clears your doubt. If you still have any problem, don't hesitate to ask. |
|
Thanks @dhruvmanila |
|
Hi, can we add solution to any problem? |


Project Euler has about 700 problems, but the current repository hosts solutions for only about 60-70 problems.
I'm willing to work on the issue and also if someone wants to help they can join in.
We can create guidelines on how many minimum solutions a PR should have to prevent spammy PRs with just one or two easy solutions. (open to discussion)