fork download
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  8. ll lw,lh,wh;
  9. cin >> lw >> lh >> wh;
  10. ll lwh = (ll)sqrt(lw*lh*wh);
  11. ll l=lwh/wh, w=lwh/lh, h=lwh/lw;
  12. cout << 4*(l+h+w) << endl;
  13. return 0;
  14. }
  15.  
  16.  
Success #stdin #stdout 0.01s 5308KB
stdin
Standard input is empty
stdout
-1040264