第25495题 单选题
Python实现更相减损术求两数最大公约数,横线处应填写的代码是?

两个正整数,只要不相等,就一直进行如下操作:最大数减去最小数得到一个值,该值和两个数的最小数构成新的两个正整数,重复操作,直到两个数相等,此时输出该数。下面的Python代码用于实现该操作,横线处应该填写的代码是()。

N = int(input())
M = int(input())
while N != M:
    if N > M:
          _______________
    else:
          _______________
print(N)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析