Go: package main

import "fmt"

func main() {
	var m, a, book int
	fmt.Scan(&m, &a, &book)

	if nokori := m - book; nokori < 0 {
		if nokori = nokori + a; nokori < 0 {
			fmt.Println("NA")
		} else {
			fmt.Println(a - nokori)
		}
	} else {
		fmt.Println(0)
	}
}

C++: #include<bits/stdc++.h>
using ll  = long long;
#define int ll
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define erep(e,v) for(auto && e :v)
#define all(in) in.begin(), in.end()
#define MP make_pair
#define INF (sizeof(int) == 4 ? (int)1e9:(int)1e18)
#define EPS 0.0000000001
using namespace std;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
template<class T> void join(T a){for(auto itr :a){if(itr != *a.begin())cout << " "; cout << itr;} }
using ld  = long double;
using pii = pair<int,int>;
using piii = pair<int,pii>;
int W,H;
int dx[]={0,0,1,-1}, dy[]={1,-1,0,0};
bool valid(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
signed main(){
    int a,b,c; cin >> a >> b >> c;
    if(a+b<c)cout << "NA" << endl;
    else cout << max(0LL,c-a)<< endl;
}

C++: #include "bits/stdc++.h"

using namespace std;

int main(){
	
	int a,b,c;
	cin >> a >>b >> c;
	
	if(a+b < c){
		cout << "NA" << endl;
	}
	else{
		cout << max(0,c-a) << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){

int m,f,b;

cin>>m>>f>>b;

 if(m>=b) cout<<"0"<<endl;
  else if (m+f<b) cout<<"NA"<<endl;
   else cout<<b-m<<endl;


return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 10000000000000009
//#define INF 9223372036854775807
typedef long long ll;
#define REP(i,n) for(int i=0;i<(n);++i)
#define OREP(i,n) for(int i=1;i<=(n);++i)
#define ORREP(i,n) for(int i=(n);i>=1;--i)
#define ZREP(i,n) for(int i=1;i<(n);++i)
#define RREP(i,n) for(int i=(n)-1;i>=0;--i)
#define rollcall cout<<"I'm Sucu."<<endl;
#define YES(s) s?cout << "YES" << endl:cout << "NO" << endl
#define Yes(s) s?cout << "Yes" << endl:cout << "No" << endl
#define Taka(s) s?cout << "Takahashi" << endl:cout << "Aoki" << endl
#define out(s,t,u) s?cout << t << endl:cout << u << endl
#define int ll
#define Endl endl

signed main(){
    int m,f,b;
    cin >> m >> f >> b;
    if(m+f<b){
        cout << "NA" << endl;
    }else{
        cout << max(0LL,b-m) << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(condition) if(condition){cout << "POSSIBLE" << endl;}else{cout << "IMPOSSIBLE" << endl;}
#define Possible(condition) if(condition){cout << "Possible" << endl;}else{cout << "Impossible" << endl;}
#define possible(condition) if(condition){cout << "possible" << endl;}else{cout << "impossible" << endl;}
#define Size(n) (n).size()

typedef long long ll;


using namespace std;

const int INF = 1e9,MOD = 1e9 + 7;
const ll LINF = 1e18;

/*---------------------------------------------------------------
long long int kaizyo(long long int hh){
    cmp=1;
    while(hh>1){
        cmp=(cmp*hh)%MOD;
        hh--;
    }
    return cmp;
}
long long int ruizyo(long long int aa, long long int bb){
    if(aa==0){
        return 1;
    }
    else if(aa%2==0){
        long long int tt=ruizyo(aa/2,bb);
        return (tt*tt)%MOD;
    }
    else{
        return (ruizyo(aa-1,bb)*bb)%MOD;
    }
}フェルマ－のア
---------------------------------------------------------------

while(x!=0){
            sum+=x%10;
          / x/=10;
        }
        各桁の和
---------------------------------------------------------------

pair<int,int> p[100000];
cin >> tmp;
p[i]=make_pair(tmp,i);
cout << p[i].second+1 << endl;//ペアの右側つまりiを出力
---------------------------------------------------------------

s.find(w[i])==string::npos
findの使い方
---------------------------------------------------------------

for(int i=0;i<n;i++){
    b[i]=x%2;
    x/=2;
  }二進数
---------------------------------------------------------------

bool f[100001];//1000000以下の素数を調べよう！
rrep(i,2,100001){
       f[i]=false;
    }
rrep(i,2,100001){
        if(!f[i]){
            for(int j=i+i;j<=100000;j+=i){
                f[j]=true;
            }
        }
    }
    for(int i=3;i<=100000;i+=2){
        if(!f[i]){
            c[i]++;
        }
    }
---------------------------------------------------------------

visited=vector<vector<bool>>(10,vector<bool>(10,false));アを全部falseに
---------------------------------------------------------------

long long gcd(long long aaa,long long bbb){
    if(bbb==0){
        return aaa;
    }
    return gcd(bbb,aaa%bbb);
}
 
long long lcm(long long aaa,long long bbb){
    long long g = gcd(aaa,bbb);
    return aaa/g * bbb;
}左から最大公約数と最小公倍数


---------------------------------------------------------------

long long int prime_cnt[10000];
       for(int i=2;i*i<=n;i++){
           while(n%i==0){
               n/=i;
               prime_cnt[i]+=1;
           }
           if(n>1){
               prime_cnt[n]+=1;
               break;
           }
      }ある数nを素因数分解しましょう

---------------------------------------------------------------
debug:
cout<<"i: "<<i<<" j: "<<j<<" cnt: "<<cnt<<"\n";

---------------------------------------------------------------*/

long long int n,cnt=0,ans=0,a,b,c,d,cmp,cmpp,m,h,w,x,y,sum=0,pos;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl=true;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);

       cin>>a>>b>>c;
       if(a+b<c)Cout("NA");
       else{
           if(a>=c)Cout(0);
           else{
               Cout(c-a);
           }
       }
       
return 0;
}

C++: #include <bits/stdc++.h>
#define pb push_back
#define REP(i, n) for (signed long long i = 0; i < (n); i++)
#define MOD 998244353
#define INF 93193111451418101
#define bitcnt(a) (ll) __builtin_popcount((a))
#define lb(a, b) lower_bound((a).begin(), (a).end(), (b))
#define ub(a, b) upper_bound((a).begin(), (a).end(), (b))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if (a >= c) {
    return !printf("%d\n", 0);
  }
  if (a + b < c) {
    return !printf("NA\n");
  }
  cout << c - a << endl;
}

C++: #include<iostream>
using namespace std;
   
int main(){
  int m,f,b;
     
  cin >> m >> f >> b;
     
  if(b-m > f){
    cout << "NO" << endl;
  }else{
    cout << max(b-m, 0) << endl;
  }
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int m,f,b;
  
  cin>>m>>f>>b;
  
  if(b-m>f){
    cout<<"NA"<<endl;
  }else{
    cout<< max(b-m,0) <<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
  int m,f,b,a;
  cin>>m>>f>>b;
  if(b>m+f){
    cout<<"NA"<<endl;
  }else if(b>m && m+f>=b){
    cout<<b-m<<endl;
  }else{
    cout<<0<<endl;
  }

  return 0;
}

C++: #include  <iostream>
using namespace std;
int main() {
int m, f, b;
cin>>m>>f>>b;
if(m>= b)cout<<0<<endl;
else if (m + f>= b) cout<<b - m<< endl;
else cout<<"NA"<< endl;
}