Project Euler solutions...warning: spoilers!