Solution to Project Euler's problems