Problem:

Grading

  Write a program which reads a list of student test scores and evaluates the performance for each student.

  The test scores for a student include scores of the midterm examination m (out of 50), the final examination f (out of 50) and the makeup examination r (out of 100). If the student does not take the examination, the score is indicated by -1.

  The final performance of a student is evaluated by the following procedure:

  
If the student does not take the midterm or final examination, the student's grade shall be F.

  
If the total score of the midterm and final examination is greater than or equal to 80, the student's grade shall be A.

  
If the total score of the midterm and final examination is greater than or equal to 65 and less than 80, the student's grade shall be B.

  
If the total score of the midterm and final examination is greater than or equal to 50 and less than 65, the student's grade shall be C.

  
If the total score of the midterm and final examination is greater than or equal to 30 and less than 50, the student's grade shall be D. However, if the score of the makeup examination is greater than or equal to 50, the grade shall be C.

  
If the total score of the midterm and final examination is less than 30, the student's grade shall be F.

Input

  The input consists of multiple datasets. For each dataset, three integers m, f and r are given in a line.

  The input ends with three -1 for m, f and r respectively. Your program should not process for the terminal symbols.

The number of datasets (the number of students) does not exceed 50.

Output

  For each dataset, print the grade (A, B, C, D or F) in a line.

Sample Input

40 42 -1
20 30 -1
0 2 -1
-1 -1 -1

Sample Output

A
C
F



Sample input:
40 42 -1
20 30 -1
0 2 -1
-1 -1 -1


Sample output:
A
C
F

Submission status: Accepted

Solution code:
L = []
while True:
        a = list(map(int, input().split()))
        if a[0] == -1and a[1] == -1 and a[2]==-1:
            break

        L.append(a)

def f(m,f,r):

    s = m + f
    if m == -1 or f == -1:
        print("F")
    elif s >= 80:
        print("A")
    elif s >= 65 and s <80:
        print("B")
    elif s >= 50 and s <65:
        print("C")
    elif s >= 30 and s <50:
        if r >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

for i in range(len(L)):
    f(L[i][0],L[i][1],L[i][2])

Submission status: Accepted

Solution code:
m = [0] * 50
f = [0] * 50
r = [0] * 50
seiseki = ['S'] * 50

for i in range(50):
    m[i], f[i], r[i] = map(int, input().split())
    if m[i] == f[i] == r[i] == -1:
        break
    if m[i] == -1 or f[i] == -1:
        seiseki[i] = 'F'
    elif m[i] + f[i] >= 80:
        seiseki[i] = 'A'
    elif m[i] + f[i] >= 65:
        seiseki[i] = 'B'
    elif m[i] + f[i] >= 50:
        seiseki[i] = 'C'
    elif m[i] + f[i] >= 30 and r[i] >= 50:
        seiseki[i] = 'C'
    elif m[i] + f[i] >= 30:
            seiseki[i] = 'D'
    elif m[i] + f[i] < 30:
        seiseki[i] = 'F'

for i in range(50):
    if seiseki[i] == 'S':
        break
    print(seiseki[i])

Submission status: Accepted

Solution code:
while True:
    m,f,r = map(int,input().split())
    if m==-1 and f==-1 and r==-1:
        break
    if m==-1 or f==-1:
        print('F')
    elif m+f >= 80:
        print('A')
    elif 65 <= m+f < 80:
        print('B')
    elif 50 <= m+f < 65:
        print('C')
    elif 30 <= m+f < 50:
        if 50 <= r:
            print('C')
        else:
            print('D')
    elif m+f < 30:
        print('F')

Submission status: Accepted

Solution code:
while True:
    m,f,r=map(int,input().split())
    if m==f==r==-1:
        break
    if m==-1 or f==-1 or m+f<30:
        print('F')
    elif m+f>=80:
        print('A')
    elif m+f>=65:
        print('B')
    elif m+f>=50:
        print('C')
    elif m+f>=30 and r>=50:
        print('C')
    else:
        print('D')

Submission status: Accepted

Solution code:
#!/usr/bin/env python

if __name__ == '__main__':
    while True:
        m, f, r = map(int, raw_input().split())

        if [m, f, r] == [-1, -1, -1]:
            break

        if m == -1 or f == -1:
            print 'F'
        elif m+f >= 80:
            print 'A'
        elif m+f >= 65:
            print 'B'
        elif m+f >= 50 or r >= 50:
            print 'C'
        elif m+f >= 30:
            print 'D'
        else:
            print 'F'

Submission status: Accepted

Solution code:
while True:
  m, f, r = list(map(int, input().split()))
  if m==f==r==-1:
    break
  if m==-1 or f==-1:
    print("F")
  elif m+f>=80:
    print("A")
  elif m+f>=65:
    print("B")
  elif m+f>=50 or (m+f>=30 and r>=50):
    print("C")
  elif m+f>=30:
    print("D")
  else:
    print("F")

Submission status: Accepted

Solution code:
sss = input()
while not sss == '-1 -1 -1':
	m,f,r = map(int, sss.split(' '))
	if m == -1 or f == -1:
		print('F')
	elif m+f >= 80:
		print('A')
	elif m+f >= 65 and m+f < 80:
		print('B')
	elif m+f >= 50 and m+f < 65:
		print('C')
	elif m+f >= 30 and m+f < 50:
		if r >= 50: print('C')
		else: print('D')
	elif m+f < 30:
		print('F')
	sss = input()

Submission status: Accepted

Solution code:
data = []
tmp = []
for x in range(0,1000000):
    a,b,c = map(int, input().split())
    if a==-1 and b==-1 and c==-1:
        break
    else:
        data.append((a,b,c))
for x in range(0,len(data)):
    tmp = list(data.pop(0))
    if tmp[0] == -1 or tmp[1] == -1 or tmp[0]+tmp[1] <30:
        print("F")
    elif 79< (tmp[0]+tmp[1]) :
        print("A")
    elif 64< (tmp[0]+tmp[1]) <80:
        print("B")
    elif 49<(tmp[0]+tmp[1])<65 or (29<(tmp[0]+tmp[1])<50 and  49<tmp[2]):
        print("C")
    else:
        print("D")
    tmp.clear()

Submission status: Runtime Error

Solution code:
while True:
    a,b,c = map(int,input().split())
    if a == b == c == -1: break
    if a+b>=80: print('A')
    elif 65 <= a+b < 80: print('B')
    elif 50 <= a+b < 65: print('C')
    elif 30 <= a+b < 50:
        if r<=50: print('C')
        else:     print('D')
    elif a+b<30: print('F')

Submission status: Runtime Error

Solution code:
n = int(input())

for _ in range(n):
  m, f, r = map(int, input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 && s < 80:
    print("B")
elif s >= 50 && s < 65 || f >= 50:
    print("C")
elif s >= 30 && s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
n = int(input())

for _ in range(n):
  m, f, r = map(int, input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 and s < 80:
    print("B")
elif (s >= 50 and s < 65) or f >= 50:
    print("C")
elif s >= 30 and s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
n = int(input())

for _ in range(n):
  m, f, r = map(int,input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 and s < 80:
    print("B")
elif (s >= 50 and s < 65) or f >= 50:
    print("C")
elif s >= 30 and s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
n = int(input())

for _ in range(n):
  m,f,r = map(int,input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 and s < 80:
    print("B")
elif (s >= 50 and s < 65) or f >= 50:
    print("C")
elif s >= 30 and s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
n=int(input())
for _ in range(n):
  m,f,r = map(int,input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 and s < 80:
    print("B")
elif (s >= 50 and s < 65) or f >= 50:
    print("C")
elif s >= 30 and s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
n = int(input())

for _ in range(n):
  m, f, r = map(int, input().split())
  s = m+f

if s >= 80:
    print("A")
elif s >= 65 and s < 80:
    print("B")
elif (s >= 50 and s < 65) or f >= 50:
    print("C")
elif s >= 30 and s < 50:
    print("D")
else:
    print("F")


if m == f == r== -1:
    print("F")

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == f == r== -1:
        break
    
    if s >= 80:
        print("A")
    elif s >= 65 and s < 80:
        print("B")
    elif (s >= 50 and s < 65) or f >= 50:
        print("C")
    elif s >= 30 and s < 50:
        print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
for _ in [None] * 50:
    m, f, r = map(int, input().split())
    result = " "
    if m == f == r == -1:
        break
    if m == -1 or f == -1 or m + f < 30:
        result = "F"
    elif m + f > 80:
        result = "A"
    elif 80 > m + f >= 65:
        result = "B"
    elif 65 > m + f >= 50:
        result = "C"
    else:
        result = "C" if r >= 50 else result = "D"
    print(result)

Submission status: Runtime Error

Solution code:
midScore =[0]*50
finScore = [0]*50
reScore = [0]*50
personNum = 0
while True:
    m,f,r = map(int,input().split())
    midScore[personNum] = m
    finScore[personNum] = f
    reScore[personNum] = r
    personNum += 1
    if m is f is r is -1:
        break
    
    
for person in range(personNum):
    totalScore = midScore[person] + finScore[person]
    if midScore[person] is finScore[person] is reScore[person] is -1:
        pass
    elif midScore[person] == -1 or finScore[person] == -1:
        print("F")
    elif 80<=totalScore:
        print("A")
    elif 65<=totalScore<80:
        print("B")
    elif 50<=totalScore<65:
        print("C")
    elif 30<=totalScore<50:
        if 50<=reScore:
            print("C")
        else:
            print("D")
    elif totalScore<30:
        print("F")

Submission status: Runtime Error

Solution code:
while(1):
    m,f,r=map(int,input().split())
    if m==-1 and f==-1 and r==-1:
        break
    elif m==-1 or f==-1:
        print("F")
    elif m+f>=80:
        print("A")
    elif m+f>=65 and m+f<80:
        print("B")
    elif m+f>=50 and m+f<65:
        print("C")
    elif m+f>=30 and m+f<50:
        print("D")
    elif r>=50:
        print("D")
    elif:
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    m,f,r= map(int.input().split())
    if m+f+r==-3:break
    if m==-1 or f==-1 or r==-1:"F"
    elif m+f>=80:s="A"
    elif m+f>=65:s="B"
    elif m+f>=50:s="C"
    elif m+f>=30 and r>=50:s="C"
    elif m+f>=30:s="D"
    else:"F"
    print(str(s)

Submission status: Runtime Error

Solution code:
while True:
    m,f,r = map(int, input().split())
    if m == f == r ==-1:
        break
    elif (m+f) >= 80:
        print("A")
    elif (m+f) < 80 and (m+f) >= 65:
        print("B")
    elif ((m+f) < 65 and (m+f) >= 50) or (((m+f) < 50 and (m+f) >= 30 and (m != -1 and f != -1)) and r >= 50)
        print("C")
    elif (m+f) < 50 and (m+f) >= 30 and (m != -1 and f != -1):
        print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m = f = r == -1:
        break:
    elif (m == -1 or f == -1) or m+f < 30:
        print(F)
    elif m + f >= 80:
        print(A)
    elif 65 <= m + f < 80:
        print(B)
    elif 50 <= m + f < 65:
        print(C)
    elif 30 <= m + F < 50:
        if r >= 50:
            print(C)
        else:
            print(D)
    else:
        print(F)

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break:
    elif (m == -1 or f == -1) or m+f < 30:
        print(F)
    elif m + f >= 80:
        print(A)
    elif 65 <= m + f < 80:
        print(B)
    elif 50 <= m + f < 65:
        print(C)
    elif 30 <= m + F < 50:
        if r >= 50:
            print(C)
        else:
            print(D)
    else:
        print(F)

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif (m == -1 or f == -1) or m+f < 30:
        print(F)
    elif m + f >= 80:
        print(A)
    elif 65 <= m + f < 80:
        print(B)
    elif 50 <= m + f < 65:
        print(C)
    elif 30 <= m + F < 50:
        if r >= 50:
            print(C)
        else:
            print(D)
    else:
        print(F)

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = map(int, input().split())
    if m == -1 and f == -1 and r == -1:
        break
    elif (m == -1 or f == -1) or m+f < 30:
        print('F')
    elif m + f >= 80:
        print('A')
    elif 65 <= m + f < 80:
        print('B')
    elif 50 <= m + f < 65:
        print('C')
    elif 30 <= m + F < 50:
        if r >= 50:
            print('C')
        else:
            print('D')
    else:
        print('F')

Submission status: Runtime Error

Solution code:
test = []
while True:
    tmp = map(int,raw_input().split())
    for i in tmp:
        if i == -1:
            break
    else:
        test.append(tmp)
for a in test:
    if a[0]+a[1] >= 80:
        print "A"
    elif 80 > a[0]+a[1] >= 65:
        print "B"
    elif 65 > a[0]+a[1] >= 50:
        print "C"
    elif 50 > a[0]+a[1] >= 30 and a[2] < 50:
        print "D"
    elif a[2] >= 50:
        print "C"
    elif a[0] + a[1] < 30:
        print "F"

Submission status: Runtime Error

Solution code:
while(not((m==-1) and (f==-1) and (r==-1)))
 m,f,r=map(int,input().split())
 if((m==-1) or (f==-1))
   print('F')

 if(m+f>=80)
   print('A')

 if(65<= m+f) and (m+f<80))
   print('B')

 if(50<= m+f) and (m+f<60))
   print('C')

 if(30<= m+f) and (m+f<50))
   if(50<=r)
    print('C')
   else
    print('D')

 if(m+f<30)
   print('F')

Submission status: Runtime Error

Solution code:
while True:
 m,f,r=map(int,input().split())
 if m==f==r==-1 : break
 if((m==-1) or (f==-1))
   print('F')

 if(m+f>=80)
   print('A')

 if(65<= m+f) and (m+f<80))
   print('B')

 if(50<= m+f) and (m+f<60))
   print('C')

 if(30<= m+f) and (m+f<50))
   if(50<=r)
    print('C')
   else
    print('D')

 if(m+f<30)
   print('F')

Submission status: Runtime Error

Solution code:
while True:
 m,f,r=map(int,input().split())
 if m==f==r==-1 : break
 if((m==-1) or (f==-1))
   print('F')

 if m+f>=80 :
   print('A')

 elif m+f >= 65 :
   print('B')

 elif m+f >= 50 :
   print('C')

 elif m+f >= 30 :
   if r >= 50
    print('C')
   else
    print('D')

 if(m+f<30)
   print('F')

Submission status: Runtime Error

Solution code:
int main(void) {
    int m,f,r;
    scanf("%d %d %d",&m,&f,&r);
    while(m!=-1 || f!=-1 || r!=-1) {
        if(m==-1 || f==-1)printf("F\n");
        else if(m+f>=80)printf("A\n");
        else if(m+f>=65)printf("B\n");
        else if(m+f>=50)printf("C\n");
        else if(m+f>=30) {
            if(r>=50)printf("C\n");
            else printf("D\n");
        }
        else printf("F\n");
        scanf("%d %d %d",&m,&f,&r);
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
while True:
 m,f,r=map(int,input().split())
 if m==f==r==-1 : break

 if (m==-1) or (f==-1):
   print('F')

 if(m+f>=80):
   print('A')

 if (65<= m+f) and (m+f<80) :
   print('B')

 if (50<= m+f) and (m+f<60):
   print('C')

 if(30<= m+f) and (m+f<50):
   if (50<=r):
    print('C')
   else
    print('D')

 if(m+f<30):
   print('F')

Submission status: Runtime Error

Solution code:
while True:
    (m,f,r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
    if mf <= 80:
        priftf('A')
    elif  65 <=  mf <= 79:
        printf('B')
    elif 50 <= mf <= 64 || r >= 50:
        printf('C')
    elif 30 <= mf <=49:
        printf('D')
    else:
        printf('F')

Submission status: Runtime Error

Solution code:
while True:
    (m, fm r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
    
    if m == -1 of f == -1 of mf < 30:
        print('F')
    elif mf < 50 and r < 50:
        print('D')
    elif mf < 65:
        print('C')
    elif mf < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
    
    if m == -1 of f == -1 of mf < 30:
        print('F')
    elif mf < 50 and r < 50:
        print('D')
    elif mf < 65:
        print('C')
    elif mf < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
    
    if m == -1 or == -1 of mf < 30:
        print('F')
    elif mf < 50 and r < 50:
        print('D')
    elif mf < 65:
        print('C')
    elif mf < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
    
    if m == -1 or f == -1 of mf < 30:
        print('F')
    elif mf < 50 and r < 50:
        print('D')
    elif mf < 65:
        print('C')
    elif mf < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m ,f ,r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    mf = m + f
        
    if m == -1 or f == -1 mf < 30:
        print('F')
    elif mf < 50 and r < 50:
        print('D')
    elif mf < 65:
        print('C')
    elif mf < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
import sys
while True:
	data=list(map(int,input().split()))
	if data[0]==data[1]==data[2]==-1: break
	
	if data[0]!=-1 and data[1]!=-1:
		sum=data[0]+data[1]
	if data[2]!=-1 and sum<data[2]
		sum=data[2]
		if sum>=50:
			sum=50
		elif sum<50:
			sum=0
	if data[0]==-1 or data[1]==-1:
		print('F')
	elif sum<30 :
		print('F')
	elif 30<=sum<50:
		print('D')
	elif 50<=sum<65:
		print('C')
	elif 65<=sum<=79:
		print('B')
	elif 80<=sum:
		print('A')

Submission status: Runtime Error

Solution code:
while True:
	m,f,r=map(int,input().split())
	if m==f==r==-1: break
	if m==-1 or f==-1:
		sum=0
	elif r!=-1:
		if r>49:
			sum=50	
		else :
			sum=r
		
	elif sum<30 :
		print('F')
	elif 30<=sum<50:
		print('D')
	elif 50<=sum<65:
		print('C')
	elif 65<=sum<=79:
		print('B')
	elif 80<=sum:
		print('A')

Submission status: Runtime Error

Solution code:
True:
    line = raw_input()
    if line == '-1 -1 -1':
        break
    middle, final, re = map(int, line.split())
    if middle == -1 or final == -1:
        grade = 'F'
    elif middle + final >= 80:
        grade = 'A'
    elif 65 <= middle + final < 80:
        grade = 'B'
    elif 50 <= middle + final < 65:
        grade = 'C'
    elif 30 <= middle + final < 50:
        if 50 <= re:
            grade = 'C'
        grade = 'D'
    elif middle + final < 30:
        grade = 'F'
    print grade

Submission status: Runtime Error

Solution code:
(m, f, r) = [int(i) for i in input().split()]
    if m==-1 and f==-1 and r==-1:
        break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g >= 80:
        print('A')
    elif g >= 65:
        print('B')
    elif g >= 30 or r >= 50:
        print('C')
    else:
        print('D')
~

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m==-1 and f==-1 and r==-1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g >= 80:
        print('A')
    elif g >= 65:
        print('B')
    elif g >= 50 or r >= 50:
        print('C')
    else:
        print('D')
~

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m==-1 and f==-1 and r==-1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g < 50 or r < 50:
        print('D')
    elif g < 65:
        print('C')
    elif g < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m == f == r == -1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g < 50 or r < 50:
        print('D')
    elif g < 65:
        print('C')
    elif g < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m==f==r==-1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g < 50 and r < 50:
        print('D')
    elif g < 65:
        print('C')
    elif g < 80:
        print('B')
    else:
        print('A')
~

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m==f==r==-1:
        break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g < 50 and r < 50:
        print('D')
    elif g < 65:
        print('C')
    elif g < 80:
        print('B')
    else:
        print('A')
~

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break
 
    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B')
    else:
        print('A')
~

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')
    elif total < 50 and r < 5-:
        print('D')
    elif total < 65:
        print('C')
    elif total < 85:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:

 (m, f, r) = [int(i)for i in input().split()]
 if m == f == -1:
    break

   total = m + f
   if m == -1 or == -1 or total < 30:
      print('F')
    elif total < 50 and r < 50:
    print('D')
    elif total < 65:
    print('C')
    elif total < 80:
    print('B')
   else:
     print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
     if m == f == r == -1:
        break
    total = m + f
    if m == -1 or f == -1 or total < 30:
       print('F')
    elif total < 50 and r < 50:
       print('D')
    elif total < 65:
       print('C')
    elif total < 80:
       print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
????????(m, f, r) = [int(i) for i in input().split()]
??????????if m == f == r == -1:
????????????????break
????????total = m + f
????????if m == -1 or f == -1 or total < 30:
??????????????print('F')
????????elif total < 50 and r < 50:
??????????????print('D')
????????elif total < 65:
??????????????print('C')
????????elif total < 80:
??????????????print('B')
????????else:
??????????????print('A')
????????????????????

Submission status: Runtime Error

Solution code:
while True:
????????(m, f, r) = [int(i) for i in input().split()]
??????????if m == f == r == -1:
????????????????break
????????total = m + f
????????if m == -1 or f == -1 or total < 30:
??????????????print('F')
????????elif total < 50 and r < 50:
??????????????print('D')
????????elif total < 65:
??????????????print('C')
????????elif total < 80:
??????????????print('B')
????????else:
????????????????print('A')
????????????????????

Submission status: Runtime Error

Solution code:
while Ture:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B')
    else:
        print('A')

Submission status: Runtime Error

Solution code:
j

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1 or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B'):
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break
    total = m + f
    if m == -1 or f == -1  or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B'):
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1  or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B'):
    else:
        print('A')

Submission status: Runtime Error

Solution code:
while True:
????????(m, f, r) = [int(i) for i in input().split()]
????????if m == f == r == -1:
????????????????break
????????total = m + f
????????if m == -1 or f == -1 or total < 30:
????????????????print('F')
????????elif total < 50 and r < 50:
????????????????print('D')
????????elif total < 65:
????????????????print('C')
????????elif total < 80:
????????????????print('B')
????????else:
????????????????print('A')

Submission status: Runtime Error

Solution code:
l = []
l= []
while True:
  m,f,r = map(int,input().split())
  if m == f == r == -1:
    break
  else:
    l.append([m,f,r])
for i in l:
  s = ''
  x = i[0] + i[1]
  if i[0] == -1 or i[1] == -1:
    s = 'F'
  elif x >= 80:
    s = 'A'
  elif x >= 65:
    s = 'B':
  elif x >= 50:
    s = 'C':
  elif x >= 30:
    s = 'D'
    if i[2] >= 50:
      s = 'C'
  else:
    s = 'F'
  print(s)

Submission status: Runtime Error

Solution code:
l = []
while True:
  m,f,r = map(int,input().split())
  if m == f == r == -1:
    break
  else:
    l.append([m,f,r])
for i in l:
  s = ''
  x = i[0] + i[1]
  if i[0] == -1 or i[1] == -1:
    s = 'F'
  elif x >= 80:
    s = 'A'
  elif x >= 65:
    s = 'B':
  elif x >= 50:
    s = 'C':
  elif x >= 30:
    s = 'D'
    if i[2] >= 50:
      s = 'C'
  else:
    s = 'F'
  print(s)

Submission status: Runtime Error

Solution code:
while True:
    m, f, v = [int(n) for n in input().split()]

    if m == f == v == -1:
        break
    sum = m + f
    if m == -1 or f == -1
        print("F")
    elif 80 <= sum:
        print("A")
    elif 65 <= sum < 80:
        print("B")
    elif 50 <= sum < 65:
        print("C")
    elif 30 <= sum < 50:
        if 50 <= v:
            print("C")
        else:
            print("D")
    else:
        print("F")

Submission status: Runtime Error

Solution code:
num = []
while True:
    m,f,r = map(int, raw_input().split())
    if m = -1:
        m = 0
    if f = -1:
        f = 0

    ans = m + f
    if m == f == r == -1:
        break

    if ans >= 80:
        num.append("A")
    elif (65 <= ans) and (ans < 80):
        num.append("B")
    elif (50 <= ans) and (ans < 65):
        num.append("C")
    elif (30 <= ans) and (ans < 50):
        if r >= 50:
            num.append("C")
    else:
        num.append("F")

for i in range(len(num)):
    print num[i]

Submission status: Runtime Error

Solution code:
num = []
while True:
    l = map(int, raw_input().split())
    if l[0] == l[1] == l[2] == -1:
        break
    sum = l[0] + l[1]
    if sum >= 80:
        num.append("A")
    elif sum >= 65:
	num.append("B")
    elif sum >= 50:
	num.append("C")
    elif sum >= 30:
        if l[2] >= 50:
	num.append("C")
        else :
	num.append("D")
    else
	num.append("F")

for i in range(len(num)):
    print num[i]

Submission status: Runtime Error

Solution code:
student_info = []
while True:
    s = map(int,raw_input().split(" "))

    if s[0] is s[1] is s[2] is -1:
        break
    
    student_info.append(s)

score_info = []
for s in student_info:
    if s[0] == -1 or s[1] == -1:
        score_info.append("F")

    elif s[0]+s[1] >= 80:
        score_info.append("A")

    elif 65 <= s[0]+s[1] < 80:
        score_info.appned("B")

    elif 50 <= s[0]+s[1] < 65:
        score_info.append("C")

    elif 30<= s[0]+s[1] < 50:
        if s[2] >= 50:
            score_info.append("C")
        else:
            score_info.append("D")
    else:
        score_info.append("F")

for i in score_info:
    print i

Submission status: Runtime Error

Solution code:

a = []
while True:
    n = map(int, raw_input().split())
    if n == [-1, -1, -1]:
        break
    a.append(n)

for n in range(len(a)):
    m = a[n][0] + a[n][1]
    
    if a[n][0] == -1 or a[n][1] == -1: 
        print "F"
        break
    if m >= 80: print "A"
    if m >= 65 and m < 80: print "B"
    if m >= 50 and m < 65: print "C"
    if m >= 30 and m < 50: 
        """#if a[n][2] < 50: #"""print "D"
        if a[n][2] >= 50: print "C"
    if m < 30: print "F"

Submission status: Runtime Error

Solution code:

if __name__ == "__main__":
	while True:
		score = [int(i) for i in input().split()]
		if score[0] == score[1] == score[2] == -1:
			break
		if score[0] == -1 or score[1] == -1:
			print ('F')
		else:
			if score[0] + score[1] >= 80:
				print ('A')
			elif score[0] + score[1] >= 65:
				print ('B')
			elif score[0] + score[1] >= 50:
				print ('C')
			elif score[0] + score[1] >= 30:
				if score[2] == -1:
					print ('D')
				else:
					if score[2] >= '50':
						print ('C')
					else:
						print ('D')
			else:
				print ('F')

Submission status: Runtime Error

Solution code:
while True:
        (m, f, r) = map(int, raw_input().split())
        if m == f == r == -1:
            break
        elif (m == -1 or f == -1) or (m + f < 30):
            print "F"
        elif m + f >= 80:
            print "A"
        elif 65 <= m + f < 80:
            print "B"
        elif 50 <= m + f < 65:
            print "C"
        elif 30 <= m + f < 50:
            if r >= 50:
                print "C"
            else:
print "D"

Submission status: Runtime Error

Solution code:
while True:
        (m, f, r) = map(int(i) for i in input().split())
        if m == f == r == -1:
            break
        elif (m == -1 or f == -1) or (m + f < 30):
            print "F"
        elif m + f >= 80:
            print "A"
        elif 65 <= m + f < 80:
            print "B"
        elif 50 <= m + f < 65:
            print "C"
        elif 30 <= m + f < 50:
            if r >= 50:
                print "C"
            else:
print "D"

Submission status: Runtime Error

Solution code:
while True:
   m, f, r = [int(i) for i in input().split()]
 
   if m == f == r == -1:
      break
   elif m or f == -1:
      return F
   
   elif m + f >= 80:
      return A
   elif 65 <= m +f < 80:
      return B
   elif 50 <= m+f < 65:
      return C
   elif 30 <= m+f < 50:
      if r >= 50:
        return C
      else:
        return D
   else:
      return F

Submission status: Runtime Error

Solution code:
while True:
    m, f, r = [int(i) for i in input().solit()]

    if m == f == r == -1:
        break

    if m == -1 or f == -1:
        print("F")

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

    if 50 <= m + f < 65:
        print("C")

    if 30 <= m + f < 50:
        print("D")

    elif r >= 50:
        print("C")

    else:
        print("F")