problem 64

Actually I don’t know in deep of this algorithm…I’m not a mathematic
student