Gcd Function In Cpp Time Complexity