tmp = 1 num = list(map(int, input().split(" "))) small = min(num) for i in range(1, small): if num[0] % i == 0 and num[1] % i == 0: tmp = i print(tmp)
這題可以用輾轉相除法