Project Euler in Python: Problems 35–45