题解 | #最大公约数#

最大公约数

https://www.nowcoder.com/practice/20216f2c84bc438eb5ef05e382536fd3

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



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

全部评论

相关推荐

想按时下班的我在等o...:我投测试也是这个情况,不知道咋办了
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务