fork download
  1. #include <bits/stdc++.h>
  2. #include <ext/pb_ds/assoc_container.hpp>
  3. using namespace __gnu_pbds;
  4. #define FAST ios::sync_with_stdio(0), cin.tie(0),cout.tie(0)
  5. #define ll long long
  6. #define ld long double
  7. #define int long long
  8. #define endl "\n"
  9. #define yes cout<<"YES"<<endl;
  10. #define no cout<<"NO"<<endl;
  11. #define pb push_back
  12. //#pragma GCC optimize("O3,unroll-loops")
  13. //#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
  14. using namespace std;
  15. const int MOD = 1e9+7 ;
  16. //const int MOD = 998244353 ;
  17. const int N = 1e5+5 ;
  18. const ll INF = 1e18 ;
  19. const ll MIN = -1e18 ;
  20. typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
  21.  
  22.  
  23. void solve() {
  24. ll v1,v2,v3,d;cin>>v1>>v2>>v3>>d;
  25. ll t=d*v3;
  26. ll q=v1+v2;
  27. cout<<fixed<<setprecision(6)<<(ld)t/q<<endl;
  28. }
  29.  
  30. signed main() {
  31. FAST;
  32. #ifndef ONLINE_JUDGE
  33. freopen("input.txt","r",stdin);
  34. freopen("output.txt","w",stdout);
  35. #endif
  36. ll t=1;
  37. cin>>t;
  38. while(t--) solve();
  39. }
  40.  
  41.  
  42.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
29131.786485