第15224题 单选题
以下实现求两个数最小公倍数的Python代码运用了什么算法?
def lcm(s,m,n):
    if s%n==0:
        return s
    else:
        return lcm(s+m,m,n)
a=int(input('请输入第1个数:'))
b=int(input('请输入第2个数:'))
c=lcm(a,a,b)
print('{}和{}的最小公倍数是{}'.format(a,b,c))
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析