#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y){
return y ? gcd(y, x % y) : x;
}
int lcm(int x, int y){
return x/gcd(x,y)*y;
}
int main(){
int x, y;
while(scanf("%d %d", &x, &y) == 2){
printf("%d\n", lcm(x, y));
}
return 0;
}
hdu 1108 最小公倍数
最新推荐文章于 2024-06-06 09:40:31 发布