#include #include #include #include #include using namespace std; int profit(int b, int s, int c) { return b + s - c; } int main() { int t; cin >> t; for(int i = 0; i != t; ++i) { int b, s, c; cin >> b >> s >> c; cout << profit(b, s, c) << endl; } return 0; }