Code for project euler