Adding my solution to Project Euler problem 41