Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	badge := []string{"AAA", "AA", "A", "B", "C", "D", "E"}
	badgeLen := len(badge)
	short := []float64{35.5, 37.5, 40, 43, 50, 55, 70}
	long := []float64{71, 77, 83, 89, 105, 116, 148}

	stdin := bufio.NewScanner(os.Stdin)
	for stdin.Scan() {
		time := strings.Split(stdin.Text(), " ")

		sT, _ := strconv.ParseFloat(time[0], 64)
		lT, _ := strconv.ParseFloat(time[1], 64)

		sR, lR, t := 0, 0, 0.0
		for _, t = range short {
			if sT < t {
				break
			}
			sR++
		}
		for _, t = range long {
			if lT < t {
				break
			}
			lR++
		}
		rank := ""
		if sR >= badgeLen || lR >= badgeLen {
			rank = "NA"
		} else if sR >= lR {
			rank = badge[sR]
		} else {
			rank = badge[lR]
		}
		fmt.Println(rank)
	}
}

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

int main(){
  double s,l;
  int sc,lc,g;

  while(cin >> s >> l){
    if(s<35.5)sc = 0;
    else if(s<37.5)sc = 1;
    else if(s<40.0)sc = 2;
    else if(s<43.0)sc = 3;
    else if(s<50.0)sc = 4;
    else if(s<55.0)sc = 5;
    else if(s<70.0)sc = 6;
    else sc = 7;

    if(l<71.0)lc = 0;
    else if(l<77.0)lc = 1;
    else if(l<83.0)lc = 2;
    else if(l<89.0)lc = 3;
    else if(l<105.0)lc = 4;
    else if(l<116.0)lc = 5;
    else if(l<268.0)lc = 6;
    else lc = 7;

    if(lc<sc)g=sc;
    else g=lc;

    if(g == 0)cout << "AAA" << endl;
    else if(g == 1)cout << "AA" << endl;
    else if(g == 2)cout << "A" << endl;
    else if(g == 3)cout << "B" << endl;
    else if(g == 4)cout << "C" << endl;
    else if(g == 5)cout << "D" << endl;
    else if(g == 6)cout << "E" << endl;
    else cout << "NA" << endl;
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	double x,y;
	while(cin>>x>>y){
		if(35.50>x&&71.00>y)
		cout<<"AAA"<<endl;
		else if(37.50>x&&77.00>y)
		cout<<"AA"<<endl;
		else if(40.00>x&&83.00>y)
		cout<<"A"<<endl;
		else if(43.00>x&&89.00>y)
		cout<<"B"<<endl;
		else if(50.00>x&&105.00>y)
		cout<<"C"<<endl;
		else if(55.00>x&&116.00>y)
		cout<<"D"<<endl;
		else if(70.00>x&&148.00>y)
		cout<<"E"<<endl;
		else cout<<"NA"<<endl;
		
	}
	return 0;
}

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

int main()
{
    double time1,time2;
    while(cin>>time1>>time2)
    {
        if(time1<35.5&&time2 <71){cout<<"AAA"<<endl;continue;}
        if(time1<37.5&&time2 <77){cout<<"AA"<<endl;continue;}
        if(time1<40&&time2 <83){cout<<"A"<<endl;continue;}
        if(time1<43&&time2 <89){cout<<"B"<<endl;continue;}
        if(time1<50&&time2 <105){cout<<"C"<<endl;continue;}
        if(time1<55&&time2 <116){cout<<"D"<<endl;continue;}
        if(time1<70&&time2 <188){cout<<"E"<<endl;continue;}
        cout <<"NA"<<endl;
    }
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	float q,p,c=0;
	while(scanf("%f%f",&q,&p) != EOF){
		if(35.50>q&&71.00>p)cout << "AAA";
		else if(37.50>q&&77.00>p)cout << "AA";
		else if(40.00>q&&83.00>p)cout << 'A';
		else if(43.00>q&&89.00>p)cout << 'B';
		else if(50.00>q&&105.00>p)cout << 'C';
		else if(55.00>q&&116.00>p)cout <<'D';
		else if(70.00>q&&148.00>p)cout <<'E';
		else cout << "NA";
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
double a,b,t[8]={35.5,37.5,40.0,43.0,50.0,55.0,70.0,2e+9},u[8]={71.0,77.0,83.0,89.0,105.0,116.0,148.0,2e+9};
string s[8]={"AAA","AA","A","B","C","D","E","NA"};
int main(){
while(cin>>a>>b){
for(int i=0;i<8;i++){
if(a<t[i]&&b<u[i]){cout<<s[i]<<endl;break;}
}
}
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ITER(c) __typeof((c).begin())
#define each(c, it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define ALL(c) c.begin(), c.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;
const int N = 7;
const string res[N + 1] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"};
const double t[N][2] = {35.50, 71.00, 37.50, 77.00, 40.00, 83.00, 43.00, 89.00, 50.00, 105.00, 55.00, 116.00, 70.00, 148.00};

int main(void){
    for(vector<double> in(2); cin >> in[0] >> in[1];){
        int ind = N;
        for(int i = N - 1; 0 <= i; i --) rep(j, 2){
            if(t[i][j] <= in[j]) break;
            if(j) ind = i;
        }
        cout << res[ind] << endl;
    }
 
    return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){

	double a,b;
	while(cin>>a>>b){
	if(a<35.5&&b<71){
	    cout<<"AAA"<<endl;

	}
	else if(a<37.5&&b<77){
	    cout<<"AA"<<endl;

	}
	else if(a<40&&b<83){
	    cout<<"A"<<endl;

	}
    else if(a<43&&b<89){
	    cout<<"B"<<endl;

	}
	else if(a<50&&b<105){
	    cout<<"C"<<endl;

	}
	else if(a<55&&b<116){
	    cout<<"D"<<endl;

	}
	else if(a<70&&b<148){
	    cout<<"E"<<endl;

	}
	else cout<<"NA"<<endl;

	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
    double a,b;
    while(scanf("%lf%lf",&a,&b) != EOF){
        if(a < 35.5 && b < 71.0)printf("AAA\n");
        else if(a < 37.5 && b < 77.0)printf("AA\n");
        else if(a < 40.0 && b < 83.0)printf("A\n");
        else if(a < 43.0 && b < 89.0)printf("B\n");
        else if(a < 50.0 && b < 105.0)printf("C\n");
        else if(a < 55.0 && b < 116.0)printf("D\n");
        else if(a < 70.0 && b < 148.0)printf("E\n");
        else printf("NA\n");
    }
    return 0;
}

C++: #include<stdio.h>
int main(){
	float m,M;
	int i;
	scanf("%f %f",&m,&M);
	if(m<70&&M<148){
		if(m<55&&M<116){
			if(m<50&&M<105){
				if(m<43&&M<89){
					if(m<40&&M<83){
						if(m<37.5&&M<77){
							if(m<35.5&&M<71){
								printf("AAA\n");
							}
							else{
								printf("AA\n");
							}
						}
						else{
							printf("A\n");
						}
					}
					else{
						printf("B\n");
					}
				}
				else{
					printf("C\n");
				}
			}
			else{
				printf("D\n");
			}
		}
		else{
			printf("E\n");
		}
	}
	else{
		printf("NA\n");
	}
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	double time1;
	double time2;
	
	while(scanf("%lf %lf", &time1, &time2) != EOF){
		if (time1 <= 35.5 && time2 < 71){
			printf("AAA\n");
		}
		else if (time1 < 37.5 && time2 < 77){
			printf("AA\n");
		}
		else if (time1 < 40 && time2 < 83){
			printf("A\n");
		}
		else if (time1 < 43 && time2 < 89){
			printf("B\n");
		}
		else if (time1 < 50 && time2 < 105){
			printf("C\n");
		}
		else if (time1 < 55 && time2 < 116){
			printf("D\n");
		}
		else if (time1 < 70 && time2 < 148){
			printf("E\n");
		}
		else {
			printf("NA\n");
		}
	}
	
	return (0);
}