fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int t,v1,v2,s;
  7. cin >> t;
  8.  
  9. while(t){
  10. cin >> v1 >> v2;
  11. s=2*((v1*v2)/(v1+v2));
  12. cout << s << endl;
  13. t--;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 3460KB
stdin
3
50 50
60 40
70 30
stdout
50
48
42