fork(1) download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. double t1,t2,t3;
  7. cin >> t1 >> t2 >> t3;
  8. double t = 1/(1/t1+1/t2+1/t3) ;
  9. if( (1/t1+1/t2+1/t3)!=0) cout << setprecision(2) << fixed << t;
  10. return 0;
  11. }
Success #stdin #stdout 0s 15224KB
stdin
1577 157.7 15.77
stdout
14.21