Project Euler Hackerrank Solution Python Code Generator