x,y= map(int,input().split()) i=min(x,y) while i>0: if x%i==0 and y%i==0 : print(i) break else: i=i-1
重發打錯
x,y= map(int,input().split()) i=min(x,y)
z=max(x,y) while Z%i!=0:
x=i
y=z%i i=min(x,y)
z=max(x,y) print('i')
又打錯
x,y= map(int,input().split()) i=min(x,y)
z=max(x,y) while Z%i!==0:
x=i
y=z%i i=min(x,y)
z=max(x,y) print('i')
抱歉一直打錯
x,y= map(int,input().split())
i=min(x,y)
z=max(x,y)
while z%i!=0:
x=i
y=z%i
i=min(x,y)
z=max(x,y)
print(i)