def main(): a = int(input("请输入a的值:")) b = int(input("请输入b的值:")) if b == 0: print("data error") return -1 else: c = a % b while c != 0: a = b b = c c = a % b print(b) main()