Updated solution to Project Euler #430 (not #403).