#include using namespace std; int profit(int b, int s, int c) { // Return the fixed profit. int x=c-s; return (b-x); } int main() { int t; cin >> t; for(int i = 0; i < t; i++){ int b; int s; int c; cin >> b >> s >> c; int result = profit(b, s, c); cout << result << endl; } return 0; }