Project Euler: 2025
In this problem, we need to find numbers N such that N can be decomposed into the concatenations of two positive integers A and B, hence N = AB, in such a way that N = (A+B)^2. All the way to N ~ 10^16.
Project Euler's rules do not allow us to share our solutions or ideas about how to solve the problems (problems beyond the first 100) outside of their platform, so I'll abide to their rules.
What I'll say though is that it is clear that you can't write an algorithm to solve it in 10^16, but since we're dealing with squared numbers, you should strongly think about going to 10^8 instead (perhaps slightly more than that).
The code is down below in an image with the key parts omitted for the reasons mentioned above. Cheers, ACC.
Comments
Post a Comment