Solving Euler Project exercises