Update Project Euler problem 7