Solution for programs of Projecteuler.net