Solving the first 5 problems on project euler