Paycom Interview Question

algorithm about gcd