solving project euler problems in python