def greatestcommondivisor(args: int) -> int: def gcd(a,b): if b == 0: return a return gcd(b,abs(a-b*2)%b) result = args[0] for i in range(1,len(args)): result = gcd(result,args[i])
return abs(result)