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 <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;
  }

  return 0;

}

C++: #include<iostream>
using namespace std;
int m,f,b,k,n;
int main(){
cin>>m>>f>>b;
k=m-b;
n=(m+f)-b;
if(k>0){
    cout<<0<<endl;
}else if(n>0){
    cout<<b-m<<endl;
}else{
    cout<<"NA"<<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(){
	cin>>A>>B>>C;
	if(A+B<C) cout<<"NA"<<endl;
	else cout<<max(0,C-A)<<endl;
}

C++: #include<cstdio>
#include<functional>
#include<algorithm>
using namespace std;
int main(void)
{
	int m,f,b,x;
	scanf("%d %d %d",&m,&f,&b);
	if(m>=b)	{
		printf("0\n");
	}
	else if(m+f>=b)	{
		printf("%d\n",b-m);
	}
	else {
		printf("NA\n");
	}
	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;
  return 0;
}

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

int m,f,b;


int main(){
Y=0;    
cin>>m>>f>>b;

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

return 0;
}

C++: // 2017/09/21 Tazoe

#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;
	}

	return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  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;
  
}

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

C++: #include<bits/stdc++.h>
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 << abs(m - b) << endl;
	else cout << "NA" << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep0(i,n) for (int i = 0; i < (n); ++i)  //0index
#define rep1(i,n) for (int i = 1; i < (n); ++i)  //1index
#define REP(i,a,b) for (int i = a; i < (b); ++i)  //aからb - 1まで
#define mREP(i,a,b) for (int i = a; i > (b); --i)  //逆
#define all(x) (x).begin(),(x).end()
const int INF = 1000000007;  //最大値兼MOD
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
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;

#define int long long

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

	if (b > (m + f))cout << "NA" << endl;
	else cout << max(0LL,b - m) << 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(b-m<=f){
            int n=b-m;
            cout << n << endl;
        }else{
            cout << "NA" << endl;
        }
    }

    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
using namespace std;

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

C++: #include <stdio.h>

int main(){
  int a, b, c;
  scanf("%d%d%d",&a,&b,&c);
  if(a + b < c) printf("NA\n");
  else printf("%d\n",c - a);
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <array>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <sstream>
#include <stdio.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <list>
#include <numeric>
#include <stack>

using namespace std;

#define Rep(i,a,b) for(int i = a; i < b; i++)
#define rep(i,b) Rep(i,0,b)
#define rrep(i,a) for(int i = a; i >= 0; i--)
#define allof(a) (a).begin(), (a).end()

typedef long long ll;
const int inf = 1e9 + 7;
const ll infll = 1ll << 60ll;
const ll mod = 1e9 + 7;
// 0~3までは右左下上 4~7までは斜め
constexpr int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
constexpr int dy[] = { 0, -1, 0, 1, 1, -1, -1, 1 };

/*
// 最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}

// 最小公倍数
ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;
}*/

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

	int m, f, b;
	cin >> m >> f >> b;

	if (m + f < b) {
		cout << "NA" << endl;
		return 0;
	}

	cout << max(b - m, 0) << endl;

	return 0;
}

C++: 
#include <iostream>
using namespace std;
int main(void){
  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;
  }
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
    int m, f, b;
    cin >> m >> f >> b;
    if (m < b) {
        if (m + f < b) {
            cout << "NA" << endl;
        } else {
            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<stdio.h>
int main(void)
{
	int m,f,b,x,y,z;
	scanf("%d %d %d",&m,&f,&b);
	if(m>=b){
		printf("0\n");
	}
	else{
		x=b-m;
		if(f>=x){
			printf("%d\n",x);
		}
		else{
			printf("NA\n");
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
  int m,f,b;
  cin>>m>>f>>b;

  if{b<(m+f)}endl;

   if(b<=m) cout<< 0 <<endl;
    else
    cout<<b-m<<endl;

  else
   cout<<"NA"<<endl;

  return 0;
}