#32127: 為何用遞迴是NA(score:0%)??


melodyshih0824 (超萌小辣椒)

學校 : 不指定學校
編號 : 204467
來源 : [218.166.54.147]
最後登入時間 :
2023-06-27 19:20:58

def gcd(a,b):    
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)

def main():
 while True:
    try:
     a,b=map(int,input().split())
     ans=gcd(a,b)
     print(ans)
    except EOFError:
         break
main()

#32132: Re: 為何用遞迴是NA(score:0%)??


cges30901 (cges30901)

學校 : 不指定學校
編號 : 30877
來源 : [39.12.66.21]
最後登入時間 :
2025-04-20 17:19:22


     a,b=map(int,input().split())


測資中有空白行,所以會出錯