Completed Project Euler problem 19