Re:Project Euler 001 the Hard Way
by chongli on Tuesday February 04, 2020 @12:43AM
(#22232775)
I solved it. My solution was pretty ugly. I ended up brute-forcing it from both directions after finding the multiplicative inverse. Did you have a more elegant solution?
[ Parent
| on HN ]
No, my solution was also mostly "brute-forcing from both directions". In the problem thread you can find more elegant solutions that rely on calculating increments, but my approach was very fast (0.3 seconds) so it's good enough for me.