qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n,m=map(int,input().split())
A=[input().split()for _ in[0]*n]
b=[input()for _ in[0]*m]
for a in A:print(sum(x*y for x,y in map(int,zip(a,b))))


Fixed code:
n,m=map(int,input().split())
A=[list(map(int,input().split()))for _ in[0]*n]
b=[int(input())for _ in[0]*m]
for a in A:print(sum(int(x)*int(y)for x,y in zip(a,b)))
Buggy code:
n,m = [int(i) for i in input().split()]
A=[]
b=[]
s=0
for i in range(m):
	A.append([int(j) for j in input().split()])

for i in range(m):
	b.append(int(input()))

for i in range(n):
	
	for j in range(m):
		s+=A[i][j]*b[j]
print(s)

Fixed code:
n, m = map(int, input().split())
A = []
b = []

for i in range(n):
    A.append([int(s) for s in input().split()])

for i in range(m):
    b.append([int(input())])

for i in range(n):
    sum_i = 0
    for j in range(m):
        sum_i += A[i][j] * b[j][0]

    print(sum_i)
Buggy code:
n,m = map(int,input().split())

a = [[0 for i in range(n)] for j in range(m)]

for i in range(n):
    a_tmp = list(map(int,input().split()))
	for j in range(m):
	    a[i][j] = a_tmp[j]

b=[]
for i in range(m):
    b.append(int(input()))
    
for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j]*b[j]
    print(c)

Fixed code:
n, m = list(map(int, input().split()))
A = []
for i in range(n):
    a = list(map(int, input().split()))
    A.append(a)
b = []
for i in range(m):
    b.append(int(input()))
c = []
for i in range(n):
    kari = 0
    for j in range(m):
        kari += A[i][j] * b[j]
    c.append(kari)
for i in c:
    print(i)
Buggy code:
n, m = map(int, input().split())

a = [[] for _ in range(n)]
for i in range(n):
  a[i] = list(map(int, input().split()))
  b = [0 for _ in range(m)]
  for i in range(m):
    b[i] = int(input())
    for i in range(n):
      d = 0
      for j in range(m):
        d += a[i][j]*b[j]
        
      print(d)


Fixed code:
n, m = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
b = [int(input()) for _ in range(m)]

for i in range(n):
    answer = 0
    for j in range(m):
        answer += a[i][j] * b[j]

    print(answer)
Buggy code:
n, m = map(int, input().split())

A = []
for i in range(n):
    A.append(list(map(int, input().split())))


print(A)
B = []
for j in range(m):
    B.append(int(input()))

print(B)

for k in range(n):
    x = 0
    for l in range(m):
        x += A[k][l] * B[l]
    print(x)

Fixed code:
n,m=map(int,input().split())
A = [[int(x) for x in input().split()] for i in[0]*n]
list = [0]*n
for j in range(m):
    b = int(input())
    for k in range(n):
        list[k] += b * A[k][j]
for l in list:print(l)
Buggy code:
(n, m) = [int(i) for i in input().split()]

A = [[]]
b = []


for i in range(n):
    A.append([int(j) for j in input().split()])

for i in range(m):
    b.append(int(input()))


for i in range(n):
    c = 0

    for j in range(m):
         c += A[i][j] * b[j]

    print(c)

Fixed code:
A, b, c = [], [], []
n, m = map(int, input().split())
for i in range(n):
    A.append([int(x) for x in input().split()])
for i in range(m):
    b.append(int(input()))
c = [0 for i in range(n)]
for i in range(n):
    for j in range(m):
        c[i] += A[i][j] * b[j]
for i in range(n):
    print(c[i])
Buggy code:
n,m=map(int,input().split())
a=[list(map(int,input().split()))for _ in range(n)]
b=[int(input())for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b]))for i in range(n)]
~                                                       


Fixed code:
n,m = map(int,input().split())
a = [list(map(int,input().split()))for _ in range(n)]
b = [int(input())for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)]))for i in range(n)]
Buggy code:
n, m = list(map(int, input().split()))
A = [[0 for w in range(m)] for h in range(n)]
B = [0 for h in range(m)]
for i in range(n):
    A[i] = list(map(int, input().split()))
for i in range(m):
    B[i] = int(input())

for i in range(n):
    c = 0
    for j in range(m):
        c += A[i][j] * B[j]
print(c)

Fixed code:
n,m = map(int,input().split())
A =[[0 for i in range(m)] for i in range(n)]
B =[0 for i in range(m)]
for i in range(n):
    A[i] = list(map(int,input().split()))
for i in range(m):
    B[i] = int(input())
c = 0
for i in range(n):
    c = 0
    for j in range(m):
        c +=A[i][j]*B[j]
    
    print(c)
Buggy code:
n,m=map(int,input().split())
a=[]
b=[]
z=[]
x=[]
for i in range(n):
    a+=[[int(i) for i in input().split()]]
for i in range(m):
    b+=[[int(i) for i in input().split()]]
for i in range(n):
    for j in range(m):
        z+=[a[i][j]*b[j][0]]
    x+=[sum(z)]
    z=0
for i in range(m):
    print(x[i])

Fixed code:
n, m = map(int, input().split())
a = [[int(i) for i in input().split()] for j in range(n)]
b = [int(input()) for i in range(m)]

for i in range(n):
    sum = 0
    for j in range(m):
        sum += a[i][j] * b[j]
    print(sum)
Buggy code:
n, m = input()
A = []
b = []
   
for i in range(n):
   A += [map(int, raw_input().split())]
 
for j in range(m):
   b += [input()]
    
for i in range(n):
   c = 0
   for j in range(m):
      c += A[i][j] * b[j]
   print c

Fixed code:
n,m = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for j in range(n)]
b = [int(input()) for i in range(m)]

for i in range(n):
    c = 0
    for j in range(m):
        c += A[i][j]*b[j]
    print(c)
Buggy code:
n, m = map(int, input().split())
a = [input().split() for _ in range(n)]
b = [input()for _ in range(m)]
for a in A:
    print(sum(int(x)*int(y) for x, y in zip(a,b)))


Fixed code:
n,m = map(int,input().split())
a = [map(int,input().split()) for _ in range(n)]
b = [int(input()) for _ in range(m)]
for ai in a:
    print(sum(x*y for x,y in zip(ai, b)))
Buggy code:
n,m=map(int,input().split())
A =[[int(i) for i in input().split()] for j in range(n)]
b = []
for i in range(m):
    b.append(int(input()))
ans = [0 for i in range(m)]
for i in range(n):
    for j in range(m):
        ans[i] += A[i][j]*b[j]
for i in ans:
    print(i))

Fixed code:
n, m = map(int, input().split())
A = [0 for i in range(n)]
for i in range(n):
    A[i] = list(map(int, input().split()))
b = [0 for i in range(m)]
for i in range(m):
    b[i] = int(input())
ans = [0 for i in range(n)]
for i in range(n):
    for j in range(m):
        ans[i] += A[i][j] * b[j]
    print(ans[i])
Buggy code:
n, m = map(int,raw_input().split())
 
A = [[0 for j in range(m)] for i in range(n)]
b = [0 for j in range(m)]
 
for i in range(n):
  A[i] = map(int, raw_input().split())
for j in range(m):
  b[j] = raw_input()
  
for i in range(n):
    c = 0
    for j in range(m):
        c += A[i][j] * b[j]
    print c

Fixed code:
n,m = map(int,input().split())
A = [[int(j) for j in input().split()] for i in range(n)]
b = [int(input()) for j in range(m)]

for i in range(n):
    c = 0
    for j in range(m):
        c += A[i][j]*b[j]
    print(c)
Buggy code:
n, m = map(int, input().split())
a = [[v for v in list(map(int, input().split()))] for i in range(n)]
b = [int(input()) for j in range(m)]
print(sum([a[i][j] * b[j] for j in range(m)]) for i in range(n))

Fixed code:
n,m=map(int, input().split())
a=[list(map(int, input().split())) for i in range(n)]
b=[int(input()) for i in range(m)]
for i in range(n):print(sum([a[i][j]*b[j] for j in range(m)]))
Buggy code:
n, m = map(int, input().split())
a = []
b = []
for i in range(n):
    a += list(map(int, input().split()))
for i in range(m):
    b += int(input())
for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j]
    print(c)


Fixed code:
n,m = map(int,input().split())
a = [[0 for i in range(m)]for j in range(n)]
b = [0 for i in range(m)]
for i in range(n):
    a[i]=list(map(int,input().split()))
for i in range(m):
    b[i] = int(input())

for i in range(n):
    sum = 0
    for j in range(m):
        sum += a[i][j]*b[j]
    print(sum)
Buggy code:
n, m = map(int, input().split())
a = [[int(n) for n in input().split()] for i in range(n)]
print(a)
b = []
for i in range(m):
    b.append(int(input()))
print(b)
c = [0 for i in range(n)]
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
    print(c[i])

Fixed code:
n, m = map(int, input().split())
a = [[0 for i in range(m)] for j in range(n)]
b = [0 for i in  range(m)]
c = [0 for i in range(n)]
for i in range(n):
    a[i] = list(map(int, input().split()))
for j in range(m):
    b[j] = int(input())
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
for i in range(n):
    print (c[i])
Buggy code:
n, m = list(map(int, input().split()))
a=[]
for i in range(n):
	a.append([int(j) for j in input().split()])
b = []
for i in range(m)
	b.append(int(input()))
for j in range(n):
	s = 0
	for j in range(m):
		s += a[i][j] * b[j]
	print(s)
	


Fixed code:
n, m = map(int, input().split())
a = [[] for i in range(n)]
b = []

for i in range(n):
    a[i] = list(map(int, input().split()))

for i in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j][0]
    print(c)
Buggy code:
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(map(int, input().split()))
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])

Fixed code:
n, m = map(int, input().split())

A = []
for i in range(n):
    A.append(list(map(int, input().split())))

B = []
for i in range(m):
    B.append(int(input()))

C = [0 for i in range(n)]
for i in range(n):
    for j in range(m):
        C[i] += A[i][j]*B[j]

for i in range(n):
    print(C[i])
Buggy code:
n,m = map(int,input().split())

a=[]
for i in range(n):
    a[i] = list(map(int,input().split()))

b=[]
for i in range(m):
    b.append(int(input()))
    
for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j]*b[j]
    print(c)

Fixed code:
n,m = map(int,input().split())

a = [[]for _ in range(n)]
for i in range(n):
    a[i] = list(map(int,input().split()))

b = [0 for _ in range(m)]
for i in range(m):
    b[i] = int(input())

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j]
    print(c)
Buggy code:
while True:
    m,f,r=map(raw_int, input().split())
    s=m+f
    if m==-1 and f==-1 and r==-1:
        break
    elif m==-1 or f==-1 or s <30:
        print 'F'
    elif s <50 and r <50:
        print 'D'
    elif s <65:
        print 'C'
    elif s <80:
        print 'B'
    else:
        print 'A'

Fixed code:
while True:
    m,f,r=map(int, input().split())
    s=m+f
    if m==-1 and f==-1 and r==-1:
        break
    elif m==-1 or f==-1 or s <30:
        print('F')
    elif s <50 and r <50:
        print('D')
    elif s <65:
        print('C')
    elif s <80:
        print('B')
    else:
        print('A')
Buggy 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:
        grade = "F"
    elif (m + f) >= 80:
        grade = "A"
    elif (m + f) => 65:
        grade = "B"
    elif (m + f) => 50:
        grade = "C"
    elif (m + f) => 30:
        if r > 50:
            grade = "C"
        else:
            grade = "D"
    else:
        grade = "F"
    print(grade)


Fixed 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 m + f >= 65:
        print("B")
    elif m + f >= 50:
        print("C")
    elif m + f >= 30:
        if r < 50:
            print("D")
        else:
            print("C")
    else:
        print("F")
Buggy code:
#! /usr/bin/env python
# -*- coding : utf-8 -*-
while True:
    m, f, r = map(int,input().split())
    if 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")

Fixed code:
#! /usr/bin/env python
# -*- coding : utf-8 -*-
while True:
    m, f, r = map(int,input().split())
    if r == m == f == -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:
        if r >= 50:
            print("C")
        else:
            print("D")
    elif m + f < 30:
        print("F")
Buggy 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")
    




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

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

    if (m == -1 or f == -1) or (m + f < 30):
        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:
        elif r >= 50:
            print("C")
        else:
            print("D")
            
    print()

Fixed 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')
Buggy 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"

Fixed code:
while True:
    m, f, r = (int(x) for x in input().split())
    if (m, f, r) == (-1, -1, -1):
        break
    sum_score = m + f

    if m == -1 or f == -1:
        print("F")
    elif sum_score >= 80:
        print("A")
    elif 65 <= sum_score < 80:
        print("B")
    elif 50 <= sum_score < 65:
        print("C")
    elif 30 <= sum_score < 50:
        print("C") if r >= 50 else print("D")
    else:
        print("F")
Buggy code:
import sys
def main():
    for line in sys.stdin:
        m, f, r = map(int, line.split())
        if m == -1 and f == -1 and r == -1:
            break
        else:
            total = m * f
            if m == -1 or f == -1:
                print("F")
            elif total >= 80:
                print("A")
            elif 65 <= total < 80:
                print("B")
            elif 50 <= total < 65:
                print("C")
            elif 30 <= total < 50:
                if r >= 50:
                    print("C")
                else:
                    print("D")
            elif total < 30:
                print("F")


if __name__ == "__main__":
    main()

Fixed code:
import sys
def main():
    for line in sys.stdin:
        m, f, r = map(int, line.split())
        if m == -1 and f == -1 and r == -1:
            break
        else:
            total = m + f
            if m == -1 or f == -1:
                print("F")
            elif total >= 80:
                print("A")
            elif 65 <= total < 80:
                print("B")
            elif 50 <= total < 65:
                print("C")
            elif 30 <= total < 50:
                if r >= 50:
                    print("C")
                else:
                    print("D")
            elif total < 30:
                print("F")


if __name__ == "__main__":
    main()
Buggy code:
while True:
    m,f,r = 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:
        print("C")
    elif( m+f)<=30 and r <=50:
        print("C")
    elif (m+f)<=30:
        print("D")
    else:
        print("F")



Fixed 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:
      print("F")
    elif 80<=m+f:
      print("A")
    elif 65<=m+f:
      print("B")
    elif 50<=m+f:
      print("C")
    elif 30<=m+f:
      if r>=50:
        print("C")
      else:
        print("D")
    else:
      print("F")
Buggy 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')

Fixed 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')
Buggy code:
#!usr/bin/env python3

import sys


def main():
    while True:
        # m, f, r = [int(score) for score in sys.stdin.readline().split()]
        m, f, r = [int(score) for score in lines.split()]
        if m == f == r == -1:
            break
        if m == -1 or f == -1:
            print('F')
        elif m+f >= 80:
            print('A')
        elif 80 > m+f >= 65:
            print('B')
        elif 65 > m+f >= 50:
            print('C')
        elif 50 > m+f >= 30:
            if r >= 50:
                print('C')
            else:
                print('D')
        elif m+f < 30:
            print('F')


if __name__ == '__main__':
    main()

Fixed code:
#!usr/bin/env python3

import sys


def main():
    while True:
        m, f, r = [int(score) for score in sys.stdin.readline().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 80 > m+f >= 65:
            print('B')
        elif 65 > m+f >= 50:
            print('C')
        elif 50 > m+f >= 30:
            if r >= 50:
                print('C')
            else:
                print('D')


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

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

Fixed 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 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')
Buggy code:
while True:
    m,f,r = map(int,input().split())
    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 r >= 50:
            print('C')
        else:
            print('D')
    elif (m + f) < 30:
        print('F')

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

Fixed code:
while True:
    m,f,r=map(int,input().split())
    if m==-1 and f==-1 and r==-1:
        break
    else:
        sum1=m+f
        if m==-1 or f==-1:
            print("F")
        else:
            if 80<=sum1:
                print("A")
            if 65<=sum1<80:
                print("B")
            if 50<=sum1<65:
                print("C")
            if 30<=sum1<50:
                if r>=50:
                    print("C")
                else:
                    print("D")
            if sum1<30:
                print("F")
Buggy code:
while True:
    m, f, r = map(int, raw_input().split())
    if m+f+r == -3:
        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:
        print "C"
    elif m+f >= 30
        if r >= 50:
            print "C"
        else:
            print "D"
    else:
        print "F"

Fixed code:
while True:
    m, f, r = 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:
        print("C")
    elif m + f >= 30:
        if r >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")
Buggy code:
while True:
    m,f,r=map(int,input().split())

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

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

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

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

    elif 30<m+f<50 and r>50:
        print("C")

    elif m+f<30:
        print("F")

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

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

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

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

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

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

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

 

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

    elif 30<m+f<50 and r>50:
        print("C")

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

    else:
        print("F")

Fixed 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:
        jdg='F'
    elif m+f>=80:
        jdg="A"
    elif m+f>=65:
        jdg="B"
    elif m+f>=50:
        jdg="C"
    else:
        jdg="C" if r>=50 else "D"
    print(jdg)
Buggy 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')

Fixed 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')