projecteuler's problem in python