This one was easy to work out on paper, but irritating to implement. It’s pretty brute force, and I read a few solutions in the problem’s forum (which you get access to after you solve the problem) that are much more elegant.
It would have been faster to start from scratch. My half-done program from 2012 had two subtle problems that I (hopefully!) wouldn’t have re-created. The first was screwing up how to index an array, and the second was that I mistakenly thought it was 50 numbers instead of 100.
On to #14!