首页 > 代码库 > hdu 1108 最小公倍数

hdu 1108 最小公倍数

水题= =

 

#include<stdio.h>#include<string.h>#include<math.h>#include<iostream>#include<algorithm>#include<queue>#include<stack>#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#define MAXN 1000#define INF 0x7ffffff#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;int gcd(int a,int b){    return a%b!=0?gcd(b,a%b):b;}int main(){    int a,b;    while(scanf("%d%d",&a,&b)!=EOF)    {        printf("%d\n",a*b/gcd(a,b));    }    return 0;}