[题目链接]
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 ",c * d / gcd(c,d)); return 0; }