Project Euler's problems solution