XJTU_Python/test/4/5.py

14 lines
205 B
Python

def input_list():
return list(map(int, input().split()))
def gcd(s1, s2):
if (s1 % s2 == 0):
return s2
else:
return gcd(s2, s1 % s2)
a = input_list()
print(gcd(a[0], a[1]))