fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int t;
  8. cin>>t;
  9. while(t--)
  10. {
  11. int u,v;int x;
  12. cin>>u>>v;
  13. cin>>x;
  14. float ans=(1.0000000000*u/x)+(1.0000000000*v/x);
  15. printf("%.10f\n",1/ans);
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 15240KB
stdin
3
3 3 3
6 2 4
38 47 847
stdout
0.5000000000
0.5000000000
9.9647054672