Codeforces 224A. Parallelepiped Sollution

Click Hints

 Solution in C++:

///**********ALLAH IS ALMIGHTY************///

///AH Tonmoy

///Department of CSE,23rd batch

///Islamic University,Bangladesh  

  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. double findEdges(double s1, double s2, double s3)
  4. {
  5. double a = sqrt(s1 * s2 / s3);
  6. double b = sqrt(s3 * s1 / s2);
  7. double c = sqrt(s3 * s2 / s1);
  8. double sum = a + b + c;
  9. return 4 * sum;
  10. }
  11. int main()
  12. {
  13. double s1, s2, s3;
  14. cin>>s1>>s2>>s3;
  15. cout <<findEdges(s1, s2, s3)<<endl;
  16. return 0;
  17. }

No comments

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...

Powered by Blogger.