def f(a, b):
if a > b:
smaller = b
else:
smaller = a
for i in range(2, smaller+1):
if a % i == 0 and b % i == 0:
return i
print("%d是最大公约数", f(35, 14))
def f(a, b):
if a > b:
smaller = b
else:
smaller = a
for i in range(2, smaller+1):
if a % i == 0 and b % i == 0:
return i
print("%d是最大公约数", f(35, 14))