Project Euler 99 Python