Warning - This site contains spoilers. Please close this page immediately if you wish to solve the problems yourself.
- Solutions: http://github.com/luckytoilet/projecteuler-solutions
- Forums: https://www.tapatalk.com/groups/eulersolutionsfr/
- Maintained by: luckytoilet@gmail.com
Project Euler (projecteuler.net)[http://projecteuler.net] is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
As the name suggests, projecteuler-solutions is a collection of solutions for site Project Euler. This site aims to provide complete and accurate solution listings for Project Euler.
After you struggle for hours or days on a difficult problem, you may eventually give up (after all, the world would be a strange place if people never gave up on a problem). At this point, you have two options:
-
Without a solution, you leave feeling frustrated; you feel as if all your effort had been for nothing. With no way to check the right answer, you don't know how close you were to the solution or where you had gone wrong. If the solution required advanced techniques unfamiliar to you, you would have had no way of knowing. In the end, you have learned nothing, leaving without even the gratification of having figured out the problem.
-
With a solution, you can compare your method with the correct solution, perhaps figure out what you did wrong. Alternatively, you can peek at the solution as a sort of 'hint' -- that is, knowing the solver's general approach, figure out the details of his solution, then code the solution yourself. Either way, you have gained from this problem -- as much as you would have gained had you solved the problem completely independently.
In the end, the purpose of Project Euler isn't to compete for rankings. The main purpose of the activity is to learn and improve yourself in a challenging and fun way. If you need to 'cheat' in order to learn from and enjoy the problems, so be it.
Projecteuler-solutions provides merely a list of answers -- that is, it does not provide solutions or code for individual problems. The link to the list of answers can be found at the top of this page.
With the numerical answers, you have access to the official forums, in which you can access dozens of solutions in numerous different programming languages, often using several very different approaches. By unlocking this valuable resource for you, Projecteuler-solutions hopes that you will be able to get more out of Project Euler.
Needless to say, it is possible for one to mindlessly copy and paste solutions one by one into Project Euler to gain ranks. Obviously, this is quite pointless, as Project Euler ranks can gain you nothing in the real world. Furthermore, a cheater's account is likely to eventually get deleted. At one point, it was possible to automate this process with a script, but now that a CAPTCHA system has been introduced, the only way to do this would be by doing it manually, which is time-consuming as well.
If you have the answer to a problem whose answer we do not yet have, or notice that an existing answer is incorrect, we would love to hear from you! Probably the easiest way to do this is to post in the Projecteuler-solutions forums. Due to massive spamming, it is necessary to create an account to post, and new accounts may not start new topics (can only post to existing topics).
All solutions here have been tested manually at least once, but mistakes are not impossible. The most likely cause for an incorrect answer would be a parameter change -- that is, a problem suddenly asks for n=120000 instead of n=100000. In this case, we will fix the answer as soon as we know about it.
The earlier solutions (<250) are mostly obtained by careful Google searching. The later solutions are a combination of Googling and collaboration on the Projecteuler-solutions forums.