#include<iostream>
using namespace std;
int main()
{
long long m,n,k,s=m,j=n;
while(cin>>m>>n)
{
if(m<n)
{
m=m+n;
n=m-n;
m=m-n;
}
k=m%n;
while(k!=0)
{
m=n;
n=k;
k=m%n;
}
cout<<s*j/n<<endl;
}
}
标签:std,除法,int,辗转,namespace,cin,long,公约数,main
来源: https://www.cnblogs.com/Leozi/p/10835645.html