Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def main():

	numbers = input().split()
	a, b = map(int, numbers)

	d = a // b
	r = a % b
	f = a / b


	if d == 1:
		print(d)
	else:	
		print('{0} {1} {2}'.format(d, r, f))
	


if __name__=="__main__":
	main()

Fixed submission:
def main():

	numbers = input().split()
	a, b, c = map(int, numbers)

	a_to_b = list(range(a, b + 1))    #a to b
	result = [x for x in a_to_b if c % x == 0]
	#約数検索
	count = int(len(result))
	print(count)
	


if __name__=="__main__":
	main()

Buggy python submission (verdict: Runtime Error):
def main():

	numbers = input().split()
	a, b = map(int, numbers)

	d = a // b
	r = a % b
	f = a / b


	if d == 1:
		print(d)
	else:
		print('{0} {1} {2}'.format(d, r, f))
	


if __name__=="__main__":
	main()

Fixed submission:
def main():

	numbers = input().split()
	a, b, c = map(int, numbers)

	a_to_b = list(range(a, b + 1))    #a to b
	result = [x for x in a_to_b if c % x == 0]
	#約数検索
	count = int(len(result))
	print(count)
	


if __name__=="__main__":
	main()
Buggy python submission (verdict: Runtime Error):
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]

Fixed submission:
num = []
while True:
    l = map(int, raw_input().split())
    if l[0] == l[1] == l[2] == -1:
        break
    if l[0]*l[1] < 0:
        num.append("F")
    else:
        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]
Buggy python submission (verdict: Runtime Error):
n = int(input())

s = m = int(input())

for i in range(n):
  in_car, out_car = map(int, input().split())
  
  m += in_car - out_car
  
  if m < 0:
    s = 0
    break
  else:
    s = max(s, m)

print(s)

Fixed submission:
n = int(input())

s = m = int(input())

for i in range(n):
  in_car, out_car = map(int, input().split())
  
  m += in_car - out_car
  
  if m < 0:
    s = 0
    break
  else:
    s = max(s, m)

print(s)
Buggy python submission (verdict: Runtime Error):
x = input()

str_list = list(x)
dict_ = {

    }

for a in str_list:
    if ord(a) - 3 < 65:
        print(chr(90 - 65 - ord(a) - 3) ,end = "")
    else:
        print(chr(ord(a) - 3) ,end = "")
print()


Fixed submission:
x = input()

str_list = list(x)
dict_ = {
    "D":"A",
"E":"B",
"F":"C",
"G":"D",
"H":"E",
"I":"F",
"J":"G",
"K":"H",
"L":"I",
"M":"J",
"N":"K",
"O":"L",
"P":"M",
"Q":"N",
"R":"O",
"S":"P",
"T":"Q",
"U":"R",
"V":"S",
"W":"T",
"X":"U",
"Y":"V",
"Z":"W",
"A":"X",
"B":"Y",
"C":"Z"
    }

for a in str_list:
    print(dict_.get(a) , end = "")
print()
Buggy python submission (verdict: Runtime Error):
import math
val = str(input()).split()

numList = list(map(int, list(val)))

print(math.sqrt(((numList[2]-numList[0]) ** 2) + ((numList[3]-numList[1]) ** 2)))


Fixed submission:
import math
val = str(input()).split()

numList = list(map(float, list(val)))

print(math.sqrt(((numList[2]-numList[0]) ** 2) + ((numList[3]-numList[1]) ** 2)))

Buggy python submission (verdict: Runtime Error):
import math
val = str(input()).split()

numList = list(map(int, list(val)))

print(math.sqrt(((numList[2]-numList[0]) ** 2) + ((numList[3]-numList[1]) ** 2)))


Fixed submission:
import math
val = str(input()).split()

numList = list(map(float, list(val)))

print(math.sqrt(((numList[2]-numList[0]) ** 2) + ((numList[3]-numList[1]) ** 2)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(0, n) :
  a, b = list(map(int, input().split()))
  sum = a + b
  if str(sum).length() > 80 :
    print("overflow")
  else :
    print(sum)

Fixed submission:
n = int(input())
for i in range(0, n) :
  a = int(input())
  b = int(input())
  sum = a + b
  if len(str(sum)) > 80 :
    print("overflow")
  else :
    print(sum)
Buggy python submission (verdict: Runtime Error):
import math

def pi(n):
    m = int(math.sqrt(n))
    keys = [n / i for i in range(1, m + 1)]
    keys += range(keys[-1] - 1, 0, -1)
    h = {i : i - 1 for i in keys}
    for i in range(2, m + 1):
        if h[i] > h[i - 1]:
            hp = h[i - 1]
            i2 = i * i
            for j in keys:
                if j < i2: break
                h[j] -= h[j / i] - hp

    return h[n]

while 1:
    i = int(raw_input())
    print pi(i)

Fixed submission:
import math
import sys

def pi(n):
    m = int(math.sqrt(n))
    keys = [n / i for i in range(1, m + 1)]
    keys += range(keys[-1] - 1, 0, -1)
    h = {i : i - 1 for i in keys}
    for i in range(2, m + 1):
        if h[i] > h[i - 1]:
            hp = h[i - 1]
            i2 = i * i
            for j in keys:
                if j < i2: break
                h[j] -= h[j / i] - hp

    return h[n]

for line in sys.stdin:
    i = int(line)
    print pi(i)
Buggy python submission (verdict: Runtime Error):
while 1:
    nums = int(input())
    if nums != 0:
        stars = list(map(int,input().split()))
        cnt = [0 for i in range((2*31)-1)]
        for x in stars:
            cnt[x] += 1
        m = max(cnt)
        if m > nums/2:
            res = cnt.index(m)
            print(res)
        else:
            print("NO COLOR")
    else:break

Fixed submission:
while 1:
    nums = int(input())
    if nums != 0:
        d = {}
        stars = list(map(int,input().split()))
        for x in stars:
            if x not in d:
                d[x] = 1
            else:
                d[x] += 1

        key = list(d.keys())
        val = list(d.values())
        m = int(max(val))
        if m > nums/2:
            res = key[val.index(m)]
            print(res)
        else:
            print("NO COLOR")
    else:break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
num = [0 for i in range(n)]
for i in range(n):
    num[i] = int(input())
m = -float('inf')
res = m
for i in range(n):
    for j in range(i+1,n):
        if m < num[j] - num[i]:
            m = num[j] - num[i]
        res = max(m,res)
print(res)

Fixed submission:
import sys
input()
mx = -float('inf')
res = mx
mn = int(input())
for i in map(int,sys.stdin.readlines()):
        if mx < i - mn:
            mx = i - mn
        if 0 > i - mn:
            mn = i
        res = max(mx,res)
print(res)
Buggy python submission (verdict: Runtime Error):
while True:
	a, b = map(int, input().split())
	print(len(str(a + b)))

Fixed submission:
while True:
	try:
		a, b = map(int, input().split())
		print(len(str(a + b)))
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
while True:
	a, b = map(int, input().split())
	if a < b:
		print(a, b)
	elif b <= a:
		print(b, a)
	elif a == 0 and b ==0:
		break;

Fixed submission:
while True:
	a, b = map(int, input().split())
	if a == 0 and b ==0:
		break;
	elif a <= b:
		print(a, b)
	elif b < a:
		print(b, a)

Buggy python submission (verdict: Runtime Error):
while True:
	a, b = map(int, input().split())
	if a < b:
		print(a, b)
	elif b <= a:
		print(b, a)
	elif a == 0 and b ==0:
		print(a, b)
		break;

Fixed submission:
while True:
	a, b = map(int, input().split())
	if a == 0 and b ==0:
		break;
	elif a <= b:
		print(a, b)
	elif b < a:
		print(b, a)
Buggy python submission (verdict: Runtime Error):
import math

r = int(input())

print('%f %f' %(r ** 2 * math.pi, r * 2 * math.pi))

Fixed submission:
import math

r = float(input())

print('%f %f' %(r ** 2 * math.pi, r * 2 * math.pi))
Buggy python submission (verdict: Runtime Error):
from numpy.random import mtrand

mt = []

for i in range(10):
    mt.append(input())

print(mt.pop(mt.index(max(mt))))
print(mt.pop(mt.index(max(mt))))
print(mt.pop(mt.index(max(mt))))

Fixed submission:
mt = []

for i in range(10):
        mt.append(int(input()))

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] )

Buggy python submission (verdict: Runtime Error):
# - coding:utf-8 -*-
from numpy.random import mtrand

mt = []

for i in range(10):
    mt.append(input())

print(str(mt.pop(mt.index(max(mt)))))
print(str(mt.pop(mt.index(max(mt)))))
print(str(mt.pop(mt.index(max(mt)))))

Fixed submission:
mt = []

for i in range(10):
        mt.append(int(input()))

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] )

Buggy python submission (verdict: Runtime Error):
mt = []

for i in range(10):
        mt.append(int(input().strip()))

mt.sort().reverse()

print( mt[0] )
print( mt[1] )
print( mt[2] )

Fixed submission:
mt = []

for i in range(10):
        mt.append(int(input()))

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] )
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    inNums = input().strip().split()
    a = int(inNums[0])
    b = int(inNums[1])
    temp = a+b
    x = 0
    digitNum = 0
    while temp // 10**x > 0:
        digitNum = x
        print(x)
    
    if inNums == None:
        break
    break

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
flag = True
inNums = []
while flag:
    inNums.append(raw_input().strip().split())
    if inNums[-1] == []:
        flag = False
        
for i in range(len(inNums)-1):
    a = int(inNums[i][0])
    b = int(inNums[i][1])
    temp = a+b
    x = 0
    digitNum = 0
    while temp // (10**x) > 0:
        digitNum = x
        x += 1
    print(digitNum)

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
flag = True
i = 0
inNums = []
while flag:
    inNums.append(raw_input().strip().split())
    if inNums[-1] == []:
        flag = False
        
for i in range(len(inNums)-1):
    a = int(inNums[i][0])
    b = int(inNums[i][1])
    temp = a+b
    x = 0
    while temp // (10**x) > 0:
        x += 1
    print(x)

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
flag = True
i = 0
inNums = []
while flag:
    input = raw_input().strip().split()
    inNums.append(input)
    if input == []:
        flag = False
for i in range(len(inNums)-1):
    a = int(inNums[i][0])
    b = int(inNums[i][1])
    temp = a+b
    x = 0
    while temp // (10**x) > 0:
        x += 1
    print(x)

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
for i in input():
    i.sprit()
    a = int(i[i][0])
    b = int(i[i][1])
    temp = a+b
    x = 0
    while temp // (10**x) > 0:
        x += 1
    print(x)

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
for i in input():
    i.split()
    a = int(i[i][0])
    b = int(i[i][1])
    temp = a+b
    x = 0
    while temp // (10**x) > 0:
        x += 1
    print(x)

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))

Buggy python submission (verdict: Runtime Error):
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print len(str(a+b))

Fixed submission:
import sys

for s in sys.stdin:
  a,b = map(int,s.split())
  print(len(str(a+b)))
Buggy python submission (verdict: Runtime Error):
for i in range(int(input())):
    a = sorted(map(int,input().split()),reversed = True)
    if a[0]**2 == a[1]**2 + a[2]**2:
        print("YES")
    else:
        print("NO")
    

Fixed submission:
for i in range(int(input())):
    a = sorted(map(int,input().split()),reverse = True)
    if a[0]**2 == a[1]**2 + a[2]**2:
        print("YES")
    else:
        print("NO")
Buggy python submission (verdict: Runtime Error):
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":"join(hour, min, sec))

Fixed submission:
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join([str(hour), str(min), str(sec)]))

Buggy python submission (verdict: Runtime Error):
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join(hour, min, sec))

Fixed submission:
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join([str(hour), str(min), str(sec)]))

Buggy python submission (verdict: Runtime Error):
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":"join([hour, min, sec]))

Fixed submission:
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join([str(hour), str(min), str(sec)]))

Buggy python submission (verdict: Runtime Error):
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join([hour, min, sec]))

Fixed submission:
input = int(input().strip())

hour = input // 3600
min = (input - 3600*hour) // 60
sec = input - 3600 * hour - 60 * min 

print (":".join([str(hour), str(min), str(sec)]))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

input = input().strip().split()
a = int(input[0])
b = int(input[1])

def comp(a, b):
        if a>b:
                return "a > b"
        elif a<b:
                return "a < b"
        else:
                return "a == b"

print(demp(a,b))

Fixed submission:
input = input().strip().split()
a = int(input[0])
b = int(input[1])

def comp(a, b):
        if a>b:
                return "a > b"
        elif a<b:
                return "a < b"
        else:
                return "a == b"

print(comp(a,b))
Buggy python submission (verdict: Runtime Error):
input = input).strip().split()

a = int(input[0])
b = int(input[1])
c = int(input[2])

if a>b>c:
    print("Yes")
else:
    print("No")

Fixed submission:
input = input().strip().split()
 
a = int(input[0])
b = int(input[1])
c = int(input[2])
 
if a<b<c:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
_fib = [1, 1]

def fib(n):
    if len(_fib) > n:
        return _fib[n]
    else:
        _fib[n] = fib[n-1] + fib[n-2]
        return _fib[n]

_n = int(raw_input())
print(fib(_n))

Fixed submission:
_fib = [None] * 45
_fib[0] = 1
_fib[1] = 1

def fib(n):
    if _fib[n] is None:
        _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

_n = int(raw_input())
print(fib(_n))

Buggy python submission (verdict: Runtime Error):
_fib = [1, 1]

def fib(n):
    if len(_fib) > n:
        return _fib[n]
    else:
        _fib[n] = fib(n-1) + fib(n-2)
        return _fib[n]

_n = int(raw_input())
print(fib(_n))

Fixed submission:
_fib = [None] * 45
_fib[0] = 1
_fib[1] = 1

def fib(n):
    if _fib[n] is None:
        _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

_n = int(raw_input())
print(fib(_n))

Buggy python submission (verdict: Runtime Error):
_fib = [None] * 44
_fib[0] = 1
_fib[1] = 1

def fib(n):
    if _fib[n] is None:
        _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

_n = int(raw_input())
print(fib(_n))

Fixed submission:
_fib = [None] * 45
_fib[0] = 1
_fib[1] = 1

def fib(n):
    if _fib[n] is None:
        _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

_n = int(raw_input())
print(fib(_n))
Buggy python submission (verdict: Runtime Error):
_n = raw_input()
_a = [int(x) in x for raw_input.split()]

_flg = 1

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            _flg = 1

print(" ".join(_a))

Fixed submission:
_n = int(raw_input())
_a = [int(x) for x in raw_input().split()]

_flg = 1
cnt = 0

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            cnt += 1
            _flg = 1

print(" ".join([str(x) for x in _a]))
print(cnt)

Buggy python submission (verdict: Runtime Error):
_n = int(raw_input())
_a = [int(x) in x for raw_input.split()]

_flg = 1
cnt = 0

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            cnt += 1
            _flg = 1

print(" ".join(_a))
print(cnt)

Fixed submission:
_n = int(raw_input())
_a = [int(x) for x in raw_input().split()]

_flg = 1
cnt = 0

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            cnt += 1
            _flg = 1

print(" ".join([str(x) for x in _a]))
print(cnt)

Buggy python submission (verdict: Runtime Error):
_n = int(raw_input())
_a = [int(x) in x for raw_input().split()]

_flg = 1
cnt = 0

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            cnt += 1
            _flg = 1

print(" ".join(_a))
print(cnt)

Fixed submission:
_n = int(raw_input())
_a = [int(x) for x in raw_input().split()]

_flg = 1
cnt = 0

while _flg:
    _flg = 0
    for i in reversed(range(1, _n)):
        if _a[i] < _a[i-1]:
            _a[i], _a[i-1] = _a[i-1], _a[i]
            cnt += 1
            _flg = 1

print(" ".join([str(x) for x in _a]))
print(cnt)
Buggy python submission (verdict: Runtime Error):
n = input()
#a = [39, 98, 44, 13, 88, 53, 10]
a = [input() for i in range(n)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
N = input()
a = [input() for i in range(N)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
10 = input()
a = [input() for i in range(10)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
n = input()
a = [input() for i in range(10)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
N = input()
a = []
for i in range(N):
    a.append(input())
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Buggy python submission (verdict: Runtime Error):
N = input()
a = []
for i in range(N):
    a.append(input())
b = [0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

Fixed submission:
import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i
Buggy python submission (verdict: Runtime Error):
n = int(input())

for i in range(n):
    x = input()
    y = input()
    ans = int(x) + int(y)
    if len(x) > 80 or len(y) > 80 or len(str(ans)) > 80:
        print("overflow")
    else:
        print(ans)

Fixed submission:
n = int(input())

for i in range(n):
    x = input()
    y = input()
    ans = int(x) + int(y)
    if len(x) > 80 or len(y) > 80 or len(str(ans)) > 80:
        print("overflow")
    else:
        print(ans)
Buggy python submission (verdict: Runtime Error):
def solve(n,s,lst):
    if n == 0 and s == 0:
        return(1)
    elif s < lst[0] or len(lst)==0:
        return(0)
    else:
        return(solve(n-1,s-lst[0],lst[1:]) + solve(n,s,lst[1:]))

if __name__ == "__main__":
    while True:
        n, s = map(int, input().split())
        if n==0 and s==0:
            break
        print(solve(n,s,list(range(9))))

Fixed submission:
def solve(n,s,lst):
    if n == 0 and s == 0:
        #print("Complete!")
        return(1)
    elif n==0 or len(lst)==0 or s < lst[0]:
        return(0)
    else:
        return(solve(n-1,s-lst[0],lst[1:]) + solve(n,s,lst[1:]))

if __name__ == "__main__":
    while True:
        n, s = map(int, input().split())

        if n==0 and s==0: 
            break
        print(solve(n,s,list(range(10))))
            
        if n==0 and s==0:
            break
Buggy python submission (verdict: Runtime Error):
hist = {}
while True:
    try:
        i,b = input().strip().split(',')
        if b in hist:
            hist[b] += 1
        else:
            hist[b] = 1
    except EOFError:
        break

print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O']))

Fixed submission:
hist = {'A':0,'B':0,'AB':0,'O':0}
while True:
    try:
        i,b = input().strip().split(',')
        hist[b] += 1
    except EOFError:
        break

print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O']))
Buggy python submission (verdict: Runtime Error):
def drawone(f):
    v = list(range(1,11))
    for i in f:
        v.remove(i)
    win = 0
    lose= 0
    for i in v:
        if i + sum(f[:2]) <= 20:
            win += 1
        else:
            lose += 1
    return(True if win>=lose else False)

while True:
    f = list(map(int,input().strip().split()))
    if drawone(f):
        print('YES')
    else:
        print('NO')

Fixed submission:
def drawone(f):
    v = list(range(1,11))
    for i in f:
        v.remove(i)
    win = 0
    lose= 0
    for i in v:
        if i + sum(f[:2]) <= 20:
            win += 1
        else:
            lose += 1
    return(True if win>=lose else False)

while True:
    try:
        f = list(map(int,input().strip().split()))
        if drawone(f):
            print('YES')
        else:
            print('NO')
    except EOFError:
        break