原理同其他人, 高精度. Py3自带..
第一数=int(input()) 第二数=int(input()) while 第二数!= 0: 第一数, 第二数 = 第二数, 第一数%第二数 print(第一数)