eolymp
bolt
Try our new interface for solving problems
Problems

Зустріч друзів

published at 2/8/24, 6:33:35 pm

include <bits/stdc++.h>

using namespace std;

void solve(){

long a,b,c;
cin>>a>>b>>c;
long lcmab = (a*b)/__gcd(a,b);
cout<<(lcmab*c)/(__gcd(lcmab,c))<<'\n';

}

int main(){

ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
solve();

}

published at 2/8/24, 6:36:20 pm

include <bits/stdc++.h>

define ll long long int

define ld long double

using namespace std; int main(){

ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n, m, k, cvb;
cin>>n>>m>>k;
cvb = (n*m) / __gcd(n, m);
cvb = (cvb*k) / __gcd(cvb, k);
cout<<cvb;

} //TECHNOBLADE NEVER DIES