Project Euler problem style 2026-01-30
Project Euler problems typically involve finding or proving and then using a lemma that makes computation of the solution feasible without brute force. There is often an obvious brute force approach, but the pick problem sizes large enough such that it is just not fast enough, but the non-brute-force is.
news.ycombinator.com/item?id=7057408 which is mega high on Google says:
I love project euler, but I've come to the realization that its purpose is to beat programmers soundly about the head and neck with a big math stick. At work last week, we were working on project euler at lunch, and had the one CS PhD in our midst not jumped up and explained the chinese remainder theorem to us, we wouldn't have had a chance.
In many cases, the efficient solution involves dynamic programming.
There are also a set of problems which are very numerical analysis in nature and require the approximation of some real number to a given precision. These are often very fiddly as I doubt most people can prove that their chosen hyperparameters guarantee the required precision.
Many problems ask for solution modulo some number. In general, this is only so that C/C++ users won't have to resort to using an arbitrary-precision arithmetic library and be able to fit everything into
uint64 instead. Maybe it also helps the judge system slightly having smaller strings to compare. The final modulos usually don't add any insight to the problems.Bibliography:
Project Euler solutions 2026-01-30
Repositories of numerical solutions:
Repositories of code solutions:
- euler.stephan-brumme.com/ large number of solutions in C++, stopped around 600. Informal permissive license, e.g. at: euler.stephan-brumme.com/243/Asked for a more formal open license at: github.com/stbrumme/euler/issues/7All of my solutions can be used for any purpose and I am in no way liable for any damages caused.
- www.ivl-projecteuler.com/home 330+ solutions in Python as of 2025. Random looking problem selection. On GitHub: github.com/igorvanloo/Project-Euler-Explained under Unlicense license, a public domain license.
- www.nayuki.io/page/project-euler-solutions. Large number of solutions, mostly in Java and Python primarily but also Mathematica and Haskell sometimes. Proprietary license.
Repositories with hints but no solutions:
Project Euler as an AI benchmark Created 2025-03-24 Updated 2026-01-30
The beauty of Project Euler is that it would serve both as a AI code generation benchmark and as an AI Math benchmark!
How I Failed, Failed, and Finally Succeeded at Learning How to Code Created 2025-03-24 Updated 2025-07-16
Colin Hughes Created 2025-03-24 Updated 2025-07-16
Claude says he's from the UK and has a background in mathematics. Oxbridge feels likely. How I Failed, Failed, and Finally Succeeded at Learning How to Code says he started off on the ORIC computer, which is British-made, so he is likely British.
Project Euler problem 2025-10-14
ProjectEuler+ 2025-10-14
As mentioned at euler.stephan-brumme.com these tend to be harder, as they have their own judge system that actually runs programs, and therefore can test input multiple test cases against their reference implementation rather than just hard testing the result for a single input.
Goes only up to Project Euler problem 254 as of 2025, which had been published much much earlier, in 2009, so presumably they've stopped there.