43 ms·
You're likely to get stuck on https://projecteuler.net/problem=66 https://projecteuler.net/problem=66 if you don't know about https://en.wikipedia.org/wiki/Pell
by btilly 5y ago
You're likely to get stuck on https://projecteuler.net/problem=66 https://projecteuler.net/problem=66 if you don't know about https://en.wikipedia.org/wiki/Pell%27s_equation https://en.wikipedia.org/wiki/Pell%27s_equation.
As someone with a math background, that was the only problem in the first 100 that I didn't find pretty straightforward.
- throwaway81523 5y agoThanks, I think I see how to do this, but I haven't tried coding it yet. It is a cool problem and a quick script shows the dumb brute force approach starts failing at d=61. I will try coding my trick to see if it works, if I get some time.
- ludston 5y agoHaha true. I got stuck on that problem for a few months before I gave up and started researching the math behind it.