Live data from Hacker News

Project Euler

projecteuler.net

61–70 of 142 posts

Re: Project Euler

#61

I wrote Problem 619 ( https://projecteuler.net/problem=619 ) which was published on 2018-01-27 and solved by 474. The problem was based on 2013 Putnam Exam problem A2 ( https://kskedlaya.org/putnam-archive/2013.pdf ) which I took at the end of undergrad. I got an email six years later (in November 2024) telling me they accepted the problem: Greetings! Please excuse the email. It's quite possible that you are no longe…

I was curious if LLMs are good for this problem. ChatGPT-5.1-Thinking one-shotted a correct Python script without any library use (https://pastecode.io/s/jg6ggxpm).

Claude Opus failed to solve after trying for a while.

Re: Project Euler

#63
post #12

Glanced at the exercises. It appears that two of them have numbers arranged in a triangle and ask for a longest path. Hmm. Given such a triangle, let m be the largest number in the triangle. For each x in the triangle, replace it with m - x. For the resulting triangle, solve it to give the shortest path using one of the well known network shortest path algorithms.

> Hmm. Given such a triangle, let m be the largest number in the triangle. For each x in the triangle, replace it with m - x.

By the time you've actually done these two steps, you could have already finished the problem with a dynamic programming approach.

(Starting from the bottom row and working upward, replace each cell in the row with the length of the longest path from itself to the bottom, which you can know by checking which of its two children has the longer path associated.)

Re: Project Euler

#65
post #61

I wrote Problem 619 ( https://projecteuler.net/problem=619 ) which was published on 2018-01-27 and solved by 474. The problem was based on 2013 Putnam Exam problem A2 ( https://kskedlaya.org/putnam-archive/2013.pdf ) which I took at the end of undergrad. I got an email six years later (in November 2024) telling me they accepted the problem: Greetings! Please excuse the email. It's quite possible that you are no longe…

I was curious if LLMs are good for this problem. ChatGPT-5.1-Thinking one-shotted a correct Python script without any library use ( https://pastecode.io/s/jg6ggxpm ). Claude Opus failed to solve after trying for a while.

project euler problems are likely in the RL corpora

Re: Project Euler

#69
post #57

I wrote Problem 371, https://projecteuler.net/problem=371 , as a high school student in 2012! I'm so happy to have spent twenty years of my life learning math and solving problems on Project Euler and elsewhere.

Interesting- I ask a license plate question (when will california run out of plates in its current serialization format, based on a couple of plates observed in two different years). It's a much simpler question, though (just linear extrapolation).

Re: Project Euler

#70

There is a somewhat similar idea behind "Ponder This" by IBM https://research.ibm.com/haifa/ponderthis/index.shtml They post a problem every month and in the end post a solution. I used to spend a bit too much time on those.

The difference is that Ponder This is harder than the average problems in Euler Project, and requires higher level of mathematical maturity.
Post reply on HN