Improved solution for problem 1
Added another option for Euler 1