#include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); int t; cin >> t; for (; t; --t) { int b, s, c; cin >> b >> s >> c; cout << b + s - c << '\n'; } return 0; }