Finished problem 27

This problem was interesting because (A) at first it looked like it
couldn't be brute-forced, and therefore (B) it really reinforced just
how FAST computers are these days. Some of my slower implementations for
other problems must be REALLY slow...