P4057 [Code+#1]晨跑

题目传送门

#include <bits/stdc++.h>

using namespace std;
typedef long long LL;
LL a, b, c;

LL gcd(LL x, LL y) {
    return y ? gcd(y, x % y) : x;
}

LL lcm(LL x, LL y) {
    return x * y / gcd(x, y);
}

int main() {
    cin >> a >> b >> c;
    cout << lcm(lcm(a, b), c) << endl;
    return 0;
}
posted @ 2021-08-31 10:53  糖豆爸爸  阅读(40)  评论(0编辑  收藏  举报
Live2D