Answer to project Euler's programming challenges