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)
Created at: 2023/11/25 15:08; Updated at: 2023/11/25 16:18
The question is resolved.