标签:typedef str 整数 success clu int oar button board
2个数A,B,中间用空格隔开。(1<= A,B <= 10^9)
输出A与B的最小公倍数。
30 105
210
代码:
#include <iostream> #include <cstdio> #include <cmath> #define MAX 50000 using namespace std; typedef long long ll; int gcd(int a,int b) { while(b ^= a ^= b ^= a %= b); return a; } int main() { int a,b; scanf("%d%d",&a,&b); printf("%lld",(ll)a / gcd(a,b) * b); }
标签:typedef str 整数 success clu int oar button board
原文地址:https://www.cnblogs.com/8023spz/p/10015467.html