'commit'
This commit is contained in:
19
TangDou/LuoGuBook/P4057.cpp
Normal file
19
TangDou/LuoGuBook/P4057.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user