Add solution to Project Euler #9.