Code for project euler problems