Solving problems from http://projecteuler.net with Python 3