sanguinecha.me/leon

Project Euler: Perfection

22-Oct-2025

Note: This post was migrated from Codeforces with some small clean-ups, and is here for archival purposes. You can check out the original here. I'll write a proper post about Project Euler soon(ish).

Unrelated, but I find it kind of funny that my previous post nearly 2 months ago was me complaining about not being able to solve a problem.

I've been dreaming of writing this for so long.

About 2 years ago, Radewoosh posted a blog celebrating that he had solved all 865 problems on Project Euler.

As a (naively optimistic) high-schooler back then, I thought to myself:

"Surely it can't be that hard, right?"

2 years later, there are now 965 problems, and I've solved all of them!!


I can’t even begin to describe how happy I am, and how wonderful the journey has been. Maybe I’ll write about it in another blog sometime. For now, I’ll answer some questions you might be thinking…

Literally, who asked?

No one, of course. But this achievement means a lot to me, and I hope that this post inspires someone out there.

How long did it take?

Kind of a difficult question to answer, actually!

Here's a general timeline:

Basically, it took 2 years. More or less.

What was the last problem you solved?

I'll be boring and say it was #965. But wait, isn't that problem super easy?

Yes. I pretty much solved all the problems sequentially. I never skipped any.

Why? Well, if I didn't do that, I probably would've ended up getting lazy and giving up. It was a way to force myself to be uncomfortable, to actually think about problems, instead of just solving those that were already at my level.

So what was your hardest/favorite/least favorite…

All of those questions are ill-defined. If you asked me 10 times, I'd give 10 different answers.

Yes, I am human. I have opinions. But I don't want to influence people into thinking that some problems are harder/easier/better than others. You'll have to come up with those conclusions yourself, by actually solving the problems!

Though, if you really want to know, then feel free to poke me in the Project Euler Discord. We can have lengthy discussions about how problem ABC is the greatest problem ever, or how problem XYZ should be removed from the site entirely :P

ZOMG! You must be some sort of math genius!

No. Not at all. In fact, I'm only taking my undergrad intro to calculus and linear algebra courses now, and they're quite "difficult".

Not "difficult" in the same way Project Euler is, though. I just find them incredibly dry.

I've never considered myself "good at math". The only things I'd say I'm good at are "Googling" and "wasting a whole afternoon trying to solve a problem".

Although, after talking to a few Discord members, I realize I haven't gotten my point across, so I'll try again.

Taking a look at the About section of PE…

"The intended audience include students for whom the basic curriculum is not feeding their hunger to learn…"

So yes, if there is one thing that I am good at, it's being willing to learn.

To be able to discover a mathematical truth, to make an incredible observation, or even just dip my toes into a new field of math. I think that's what makes Project Euler fantastic.

I'll leave the symbol-shuffling and fancy notation to the real mathematicians.

At the end of the day, I'm just a silly teenager with too much time on his hands.

So should I start solving Project Euler?

As with many things, my answer is simply "Maybe."

If you want to experience the joy of solving problems, then sure, of course!

But if you just want to solve PE to get better at competitive programming, then I'd suggest thinking carefully about it.

Yes, there's some correlation between being good at PE and being good at competitive programming. But they're still two very different things.

You don't have to be an LGM to be good at PE, and you don't have to be good at PE to be an LGM.

I think the biggest difference is that competitive programming is a lot more mechanical: you have to solve X number of tasks within Y hours. Also, some of the techniques are more standardized.

For PE, there is no time limit, and there are no standard problems. Each new problem is like a gift from the problem setter, and you are free to bang your head against the wall for however long you want.

There are many more differences, but this margin is too narrow, so I'll leave it at that.


Lastly, I'd like to thank the following people:


…Now what?