标签:span .com lan turn tar 链接 scan geo its
[题目链接]
https://www.lydsy.com/JudgeOnline/problem.php?id=5105
[算法]
答案为三个数的最小公倍数
[代码]
#include<bits/stdc++.h> using namespace std; long long gcd(long long a,long long b) { if (b == 0) return a; else return gcd(b,a % b); } int main() { long long a,b,c; scanf("%lld%lld%lld",&a,&b,&c); long long d = a * b / gcd(a,b); printf("%lld\n",c * d / gcd(c,d)); return 0; }
标签:span .com lan turn tar 链接 scan geo its
原文地址:https://www.cnblogs.com/evenbao/p/9501012.html