Buggy python submission (verdict: Runtime Error):
n = int(input())
res_tak = [0 for i in range(n)]
res_she = [0 for i in range(n)]
for j in range(n):
    a, b = (int(i) for i in input().split())
    res_tak[j] = a
    res_she[j] = b
tak = 0
she = 0
for i in range(n):
    if i & 1 == 1:
        she += max(res_she)
        j=0
        while res_she[j]==max(res_she):
            j+=1
        res_she[j] = 0
        res_tak[j] = 0
    else:
        tak += max(res_tak)
        j=0
        while res_tak[j]==max(res_tak):
            j+=1
        res_she[j] = 0
        res_tak[j] = 0


print(abs(she-tak))


Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=input()
b=input()
c=input()
tim = 0
for i in range(n):
    if a[i] == b[i] and b[i] != c[i]:
        tim+=1
    elif b[i] == c[i] and c[i] != a[i]:
        tim+=1
    elif c[i] == a[i] and a[i] != b[i]:
        tim+=1
    elif c[i] == a[i] and a[i] == b[i]:
        tim+=0
    else:
        tim+=2
print(tim)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

Buggy python submission (verdict: Runtime Error):
n=input()
a=input()
b=input()
c=input()
tim = 0
for i in range(int(n)):
    if a[i] == b[i] and b[i] != c[i]:
        tim+=1
    elif b[i] == c[i] and c[i] != a[i]:
        tim+=1
    elif c[i] == a[i] and a[i] != b[i]:
        tim+=1
    elif c[i] == a[i] and a[i] == b[i]:
        tim+=0
    else:
        tim+=2
print(tim)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

Buggy python submission (verdict: Runtime Error):
n,a,b,c = (i for i in input().split())
tim = 0
for i in range(n):
    if a[i] == b[i] and b[i] != c[i]:
        tim+=1
    elif b[i] == c[i] and c[i] != a[i]:
        tim+=1
    elif c[i] == a[i] and a[i] != b[i]:
        tim+=1
    elif c[i] == a[i] and a[i] == b[i]:
        tim+=0
    else:
        tim+=2
print(tim)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

Buggy python submission (verdict: Runtime Error):
n=input()
a=input()
b=input()
c=input()
tim = 0
for i in range(n):
    if a[i] == b[i] and b[i] != c[i]:
        tim+=1
    elif b[i] == c[i] and c[i] != a[i]:
        tim+=1
    elif c[i] == a[i] and a[i] != b[i]:
        tim+=1
    elif c[i] == a[i] and a[i] == b[i]:
        tim+=0
    else:
        tim+=2
print(tim)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

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

n = int(sys.argv[1])
a = int(sys.argv[2])
b = int(sys.argv[3])
x = max(a, b)
y = a+b-n
if y < 0:
    y = 0
print(x, y)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
x = max(a, b)
y = a+b-n
if y < 0:
    y = 0
print(x, y)

Fixed submission:
n,a,b = (int(i) for i in input().split())
x=min(a,b)
y=a+b-n
if y < 0:
    y=0
print(x,y)