Start: Jul, 06, 2019 10:00:00
20190706Python程序设计基础培训扩展练习
End: Jul, 17, 2019 12:00:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 62ms
Memory: 25316kB
Author: 15306560260
In contest: 1300

def myfunc(n):
    if n>=90 and n<=100:
        print("A")
    elif n>=80 and n<=90:
        print("B")
    elif n>=70 and n<=80:
        print("C")
    elif n>=60 and n<=70:
        print("OK")
    else:
        print("ARE YOU PIG?")

x,y=list(map(int,input().split()))
lst=[]
for xcase in range(x):
    a=input().split()
    n=a[0]
    m=a[1]
    s=int(a[2])
    lst.append([n,m,s])
for ycase in range(y):
    a=input()
    for i in range(x):
        b=lst[i][0]
        if a==b:
            c=lst[i][2]
            myfunc(c)
            break