Project Euler Solution : Pool 2