Python solution to problem 3 of project Euler.