fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. #define GG ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  5. int main () { GG;
  6. ll a[3],x,y,z;
  7. for(int i=0;i<3;i++) cin>>a[i];
  8. sort(a,a+3);
  9.  
  10. z=sqrt( ( (a[0]*a[1])/a[2] ) );
  11. y=a[1]/z;
  12. x=a[0]/z;
  13. ll s= (4*x)+(4*y)+(4*z);
  14. cout<<s;
  15. return 0;}
Success #stdin #stdout 0.01s 5296KB
stdin
1 1 1
stdout
12