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

Python: [a, b] = [float(num) for num in input().split()];

if (a < 35.5) & (b < 71.0):
	print('AAA');
elif (a < 37.5) & (b < 77.0):
	print('AA');
elif (a < 40.0) & (b < 83.0):
	print('A');
elif (a < 43.0) & (b < 89.0):
	print('B');
elif (a < 50.0) & (b < 105.0):
	print('C');
elif (a < 55.0) & (b < 116.0):
	print('D');
elif (a < 70.0) & (b < 148.0):
	print('E');
else:
	print('NA');

Python: while 1:
    try:
        t500, t1000 = map(float, input().split())
    except EOFError:
        break

    if t500 < 35.5 and t1000 < 71:
        print("AAA")
    elif t500 < 37.5 and t1000 < 77:
        print("AA")
    elif t500 < 40 and t1000 < 83:
        print("A")
    elif t500 < 43 and t1000 < 89:
        print("B")
    elif t500 < 50 and t1000 < 105:
        print("C")
    elif t500 < 55 and t1000 < 116:
        print("D")
    elif t500 < 70 and t1000 < 148:
        print("E")
    else:
        print("NA")

Python: times = [["AAA",35.50,71.00],["AA",37.50,77.00],["A",40.00,83.00],["B",43.00,89.00],["C",50.00,105.00],["D",55.00,116.00],["E",70.00,148.00]]
while True:
    try:
        a,b = map(float,input().split())
    except:
        break
    for time in times:
        if a < time[1] and b < time[2]:
            print(time[0])
            break
        if time[0] == "E":
            print("NA")

Python: while True:
    try:
        t1,t2=map(float,input().split())
        if t1<35.5 and t2<71:
            print("AAA")
        elif t1<37.5 and t2<77:
            print("AA")
        elif t1<40 and t2<83:
            print("A")
        elif t1<43 and t2<89:
            print("B")
        elif t1<50 and t2<105:
            print("C")
        elif t1<55 and t2<116:
            print("D")
        elif t1<70 and t2<148:
            print("e")
        else:
            print("NA")
    except:break

Python: # Aizu Problem 00123: Speed Skating Badge Test
#
import sys, math, os, copy

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


grades = ["AAA", "AA", "A", "B", "C", "D", "E", "NA"]
limits = [[35, 71], [37, 77], [40, 83], [43, 89], [50, 105],
          [55, 116], [70, 148], [999, 999]]

for line in sys.stdin:
    t1, t2 = [float(_) for _ in line.split()]
    for k in range(8):
        if t1 < limits[k][0] and t2 < limits[k][1]:
            print(grades[k])
            break

Python: # Aizu Problem 00123: Speed Skating Badge Test
#
import sys, math, os, copy

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


grades = ["AAA", "AA", "A", "B", "C", "D", "E", "NA"]
limits = [[35.5, 71], [37.5, 77], [40, 83], [43, 89], [50, 105],
          [55, 116], [70, 148], [99999999, 999999999]]

for line in sys.stdin:
    t1, t2 = [float(_) for _ in line.split()]
    for k in range(8):
        if t1 < limits[k][0] and t2 < limits[k][1]:
            print(grades[k])
            break

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0123
"""
import sys


def solve(r500, r1000):
    criteria = [(35.0, 71.0, 'AAA'), (37.0, 77.0, 'AA'), (40.0, 83.0, 'A'), (43.0, 89.0, 'B'),
                (50.0, 105.0, 'C'), (55.0, 116.0, 'D'), (70.0, 148.0, 'E')]
    rank = None
    for c500, c1000, r in criteria:
        if r500 < c500 and r1000 < c1000:
            rank = r
            break
    if rank == None:
        rank = 'NA'
    return rank


def main(args):
    for line in sys.stdin:
        r500, r1000 = [float(x) for x in line.strip().split()]
        result = solve(r500, r1000)
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0123
"""
import sys


def solve(r500, r1000):
    criteria = [(35.50,  71.0, 'AAA'),
                (37.50,  77.0, 'AA'),
                (40.0,   83.0, 'A'),
                (43.0,   89.0, 'B'),
                (50.0,  105.0, 'C'),
                (55.0,  116.0, 'D'),
                (70.0,  148.0, 'E')]
    rank = None
    for c500, c1000, r in criteria:
        if r500 < c500 and r1000 < c1000:
            rank = r
            break
    if rank == None:
        rank = 'NA'
    return rank


def main(args):
    for line in sys.stdin:
        r500, r1000 = [float(x) for x in line.strip().split()]
        result = solve(r500, r1000)
        print(result)


if __name__ == '__main__':
    main(sys.argv[1:])

Python: def judge(t1, t2):
  if t1 < 35.5 and t2 < 71:
    print("AAA")
  elif t1 < 37.5 and t2 < 77:
    print("AA")
  elif t1 < 40 and t2 < 83:
    print("A")
  elif t1 < 43 and t2 < 89:
    print("B")
  elif t1 < 50 and t2 < 105:
    print("C")
  elif t1 < 55 and t2 < 116:
    print("D")
  elif t1 < 70 and t2 < 148:
    print ("E")
  else:
    print("NA")

while True:
  try:
   t1, t2 = map(float, input().split())
   judge(t1, t2)
  except EOFError:
    break

Python: while True:
    try:
        t1, t2 = map(float, input().split())
    except:
        break
    t1, t2 = int(t1*100), int(t2*100)
    if t1 < 3550 and t2 < 7100:
        print("AAA")
    elif t1 < 3750 and t2 < 7700:
        print("AA")
    elif t1 < 4000 and t2 < 8300:
        print("A")
    elif t1 < 4300 and t2 < 8900:
        print("B")
    elif t1 < 5000 and t2 < 10500:
        print("C")
    elif t1 < 5500 and t2 < 11600:
        print("D")
    elif t1 < 7000 and t2 < 14800:
        print("E")
    else:
        print("NA")

Python: while True:
    try:
        t1,t2=map(float,input().split())
    except:break
    if t1<35.5 and t2<71.0:
        print("AAA")
    elif t1<37.5 and t2<77.0:
        print("AA")
    elif t1<40.0 and t2<83.0:
        print("A")
    elif t1<43.0 and t2<89.0:
        print("B")
    elif t1<50.0 and t2<105.0:
        print("C")
    elif t1<55.0 and t2<116.0:
        print("D")
    elif t1<70.0 and t2<148.0:
        print("e")
    else:
        print("NA")

Python: # -*- coding: utf-8 -*- 

rank = ["AAA", "AA", "A", "B", "C", "D", "E"]
ref0 = [35.5, 37.5, 40.0, 43.0, 50.0, 55.0, 70.0]
ref1 = [71.0, 77.0, 83.0, 89.0, 105.0, 116.0, 148.0]

while True:
  try:
    t1,t2 = map(float,input().split())
  except EOFError:
    break
  
  #print(len(rank))
  
  for i in range(len(rank)):
    if t1 < ref0[i] and t2 < ref1[i]:
      print(rank[i])
      break
  else:
    print("NA")

Python: import sys

R = ["AAA","AA","A","B","C","D","E","NA"]


for i in sys.stdin:
    t1,t2 = map(float,i.split())
    t5 = t10 = 0
    if   t1 < 35.5: t5 = 0
    elif t1 < 37.5: t5 = 1
    elif t1 < 40  : t5 = 2
    elif t1 < 43  : t5 = 3
    elif t1 < 50  : t5 = 4
    elif t1 < 55  : t5 = 5
    elif t1 < 70  : t5 = 6
    else          : t5 = 7

    if   t2 < 71  : t10 = 0
    elif t2 < 77  : t10 = 1
    elif t2 < 83  : t10 = 2
    elif t2 < 89  : t10 = 3
    elif t2 < 105 : t10 = 4
    elif t2 < 116 : t10 = 5
    elif t2 < 148 : t10 = 6
    else          : t10 = 7

    t = max(t5,t10)
    print(R[t])