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 namespace std;



int main(){

  int n,m,g,ans=0;
  bool j=true; 
  cin>>n>>m>>g;
  if(n+m<g){j=false;}
  if(g>n){ans=g-n;}
  if(j){cout<<ans<<endl;}
  if(!j){cout<<"NA"<<endl;}


  return 0;
}

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

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

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>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<P,int> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

int A,B,C;

int main(){
	if(A+B>C) cout<<"NA"<<endl;
	else cout<<max(0,C-A)<<endl;
}

C++: #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i,n) for (int i=0;i<(int)(n);i++)
#define codefor int test;scanf("%d",&test);while(test--)
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define yn(ans) if(ans)printf("Yes\n");else printf("No\n")
#define YN(ans) if(ans)printf("YES\n");else printf("NO\n")
#define vector2d(type,name,h,...) vector<vector<type>>name(h,vector<type>(__VA_ARGS__))
#define umap unordered_map
#define uset unordered_set
using namespace std;
using ll = long long;
const int MOD=1000000007;
//入力系
void scan(int& a){scanf("%d",&a);}
void scan(long long& a){scanf("%lld",&a);}
template<class T> void scan(T& a){cin>>a;}
template<class T> void scan(vector<T>& vec){for(auto&& it:vec)scan(it);}
void in(){}
template <class Head, class... Tail> void in(Head& head, Tail&... tail){scan(head);in(tail...);}
//出力系
void print(const int& a){printf("%d",a);}
void print(const long long& a){printf("%lld",a);}
void print(const double& a){printf("%.15lf",a);}
template<class T> void print(const T& a){cout<<a;}
template<class T> void print(const vector<T>& vec){if(vec.empty())return;print(vec[0]);for(auto it=vec.begin();++it!= vec.end();){putchar(' ');print(*it);}}
void out(){putchar('\n');}
template<class T> void out(const T& t){print(t);putchar('\n');}
template <class Head, class... Tail> void out(const Head& head,const Tail&... tail){print(head);putchar(' ');out(tail...);}
//デバッグ系
template<class T> void dprint(const T& a){cerr<<a;}
template<class T> void dprint(const vector<T>& vec){if(vec.empty())return;cerr<<vec[0];for(auto it=vec.begin();++it!= vec.end();){cerr<<" "<<*it;}}
void debug(){cerr<<endl;}
template<class T> void debug(const T& t){dprint(t);cerr<<endl;}
template <class Head, class... Tail> void debug(const Head& head, const Tail&... tail){dprint(head);cerr<<" ";debug(tail...);}
ll intpow(ll a, ll b){ ll ans = 1; while(b){ if(b & 1) ans *= a; a *= a; b /= 2; } return ans; }
ll modpow(ll a, ll b, ll p){ ll ans = 1; while(b){ if(b & 1) (ans *= a) %= p; (a *= a) %= p; b /= 2; } return ans; }

int main(){
    INT(m,f,b);
    if(m+f<b)out("NA");
    else if(m<b&&m+f>=b)out(b-m);
    else out(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<iostream>
uisng 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;

return 0;
}

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

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

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

int m,f,b;


int main(){
cin>>m>>f>>b;

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

return 0;
}

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 <stdio.h>
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

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

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

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

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll m, f, b, result = 0;
  cin >> m >> f >> b;
  if(m < b) {
    result = b - m;
  }
  if (f < result) {
    cout << "NA" << endl;
    return 0;
  }
  cout << result << endl;
	return 0;
}

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

int m,f,b;


int main(){
cin>>m>>f>>b;

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

return 0;
}

C++: #include<iostream>
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;
}