#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int N = (int) 3e5 + 7; const int MOD = (int) 1e9 + 7; int profit(int a, int b, int c) { return a + b - c; } int main() { #ifdef LOCAL freopen("in.txt", "r", stdin); #endif ios_base::sync_with_stdio(0); int t; cin >> t; for(int test = 1; test <= t; test++) { int a, b, c; cin >> a >> b >> c; cout << profit(a, b, c) << endl; } return 0; }