#include<iostream>
#include<cmath>
using namespace std;
int min(int m,int n)
{ int r,a,b,d,p;
a=m;
b=n;
do
{r=m%n;
m=n;
n=r;
}
while(r!=0);
p=m;
d=a*b/p;
return d;
}
int main()
{int x,y;
cin>>x>>y;
cout<<min(x,y)<<endl;
return 0;
}
求两数的最小公倍数
于 2018-01-23 17:22:57 首次发布