#include<iostream>
using namespace std;
int gcd(const int& a,const int& b){
return a%b ? gcd(b,a%b) : b;
}
int main(){
int A=0,B=0;
cin>>A>>B;
//除数不能为0
if(A%B==0){
if(A>=B){
cout<<A<<endl;
}else{
cout<<B<<endl;
}
return 0;
}
cout<<(A*B)/gcd(A,B);
return 0;
}
来源:CSDN
作者:辰星~
链接:https://blog.csdn.net/weixin_45295598/article/details/104617678