Proj Euler solved in python