#include<stdio.h>
int main()
{
int a,b,i=1,temp,lcm;
scanf("%d %d",&a,&b);
if(a>b)
{
temp=a;
a=b;
b=temp;
}
lcm=b;
if(b%a!=0)
{
while(lcm%a!=0)
{
lcm=b*i;
i++;
}
printf("%d",lcm);
}
else printf("%d",b);
}
转载于:https://www.cnblogs.com/Legen-da/p/6217032.html