#include #include #include #include int profit(int b, int s, int c) { return b + s - c; } int main() { int t; scanf("%i", &t); while (t) { int b, s, c; scanf("%i %i %i", &b, &s, &c); int result = profit(b, s, c); printf("%d\n", result); t --; } return 0; }