#include <algorithm> #include <vector> #include <stdio.h> #include <iostream> #include <cassert> using namespace std; #define ran(i, a, b) for ((i) = (a); (i) < (b); (i)++) #define rep(i, a) ran ((i), 0, (a)) #define rep1(i, a) ran ((i), 1, (a)+1) using ll = long long; using vi = vector<int>; using ii = pair<int, int>; #if defined(SHIROKO1_LOCAL) && !defined(NDEBUG) template <typename T> static void DEBUG(T&& s) { cerr << s << endl; } template <typename T, typename... Ts> static void DEBUG(T&& a, Ts&&... as) { cerr << a << ' '; DEBUG(as...); } #else #define DEBUG(...) ((void)0) #endif int main() { int t; cin >> t; while (t--) { int b, s, c; cin >> b >> s >> c; cout << (b+s-c) << endl; } return 0; }