Add solution to Project Euler problem 5