FYI: I'm not concerned with just finding a solution, that can be done with manual bruteforce calculations. I was concerned with finding a more "mathematical" approach, which I didn't find (and thus resorted to code). The solution listed in the doc is, however, the shortest solution, which could be considered the "simplest", going by that metric.