Advertisement
Plabon_dutta

UVA 12502 Three Families

Apr 23rd, 2021
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <math.h>
  3. #include<string>
  4. #define pi acos(-1.0)
  5. #define ll long long int
  6.  
  7. using namespace std;
  8.  
  9. int main() {
  10.     ll t;
  11.     cin >> t;
  12.     while(t--) {
  13.         ll a, b, c;
  14.         cin >> a >> b >> c;
  15.         cout << c*(2*a-b)/(a+b) << "\n";
  16.     }
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement