Refactored euler solutions to have original problem statement.