fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <cmath>
  4. #include <cstring>
  5. #include <vector>
  6. #include <algorithm>
  7. #include <set>
  8. #include <stack>
  9. #include <map>
  10. #include <iomanip>
  11. #include <string>
  12. #define INPUT "input.txt"
  13. #define OUTPUT "output.txt"
  14. using namespace std;
  15.  
  16. int t;
  17. const double pi = atan(1.0) * 4.0;
  18. double r[3];
  19.  
  20. int main()
  21. {
  22. cin >> t;
  23. while (t--)
  24. {
  25. cin >> r[0] >> r[1] >> r[2];
  26. double R = (r[0] * r[1] * r[2]) / (r[0] * r[1] + r[1] * r[2] + r[0] * r[2] + 2.0 * sqrt(r[0] * r[1] * r[2] * (r[0] + r[1] + r[2])));
  27. cout << fixed << setprecision(9) << R << '\n';
  28. }
  29. return 0;
  30. }
  31. //(c)gacongnghiep
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty