题解 | #求最小公倍数#

求最小公倍数

https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3

A,B = list(map(int,input().split()))
ls = []
for i in range(1,int(A*B**0.5)+1):
    if (A%i == 0) and (B%i == 0):
        ls.append(i)
print(int(A*B/ls[-1]))

全部评论

相关推荐

牛客92804383...:在他心里你已经是他的员工了
点赞 评论 收藏
分享
龙珠传说:nb,公务员解约不需要支付违约金吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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