题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1108
#include <stdio.h>
#include <stdlib.h>
int gcd(int a,int b)
{
int temp;
while(b!=0)
{
temp=a%b;
a=b;
b=temp;
}
return a;
}
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
int tp,g;
g=gcd(a,b);
printf("%d\n",a/g*b);
}
return 0;
}