Solver euler problems in python