Project Euler exercise solutions.