Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def sum_digits(val):
    work = 0
    while True:
        work += val % 10
        val //= 10
        if val == 0:
            break
    return work
   
n = int(input())

values = []
for a in range(2, n + 1):
    b = n - a
    if b < 2:
        continue
    # print("{}, {} / {}, {}".format(a, sum_digits(a), b, sum_digits(b)))
    values.append(sum_digits(a) + sum_digits(b))

values.sort()
# print(values)
print(values[0])

Fixed submission:
# -*- coding: utf-8 -*-

def sum_digits(val):
    work = 0
    while True:
        work += val % 10
        val //= 10
        if val == 0:
            break
    return work
   
n = int(input())

values = []
for a in range(1, n + 1):
    b = n - a
    if b < 1:
        continue
    # print("{}, {} / {}, {}".format(a, sum_digits(a), b, sum_digits(b)))
    values.append(sum_digits(a) + sum_digits(b))

values.sort()
# print(values)
print("0" if len(values) == 0 else values[0])

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

def sum_digits(val):
    work = 0
    while True:
        work += val % 10
        val //= 10
        if val == 0:
            break
    return work
   
n = int(input())

values = []
for a in range(2, n + 1):
    b = n - a
    if b < 2:
        continue
    # print("{}, {} / {}, {}".format(a, sum_digits(a), b, sum_digits(b)))
    values.append(sum_digits(a) + sum_digits(b))

values.sort()
# print(values)
print(values[0])

Fixed submission:
# -*- coding: utf-8 -*-

def sum_digits(val):
    work = 0
    while True:
        work += val % 10
        val //= 10
        if val == 0:
            break
    return work
   
n = int(input())

values = []
for a in range(1, n + 1):
    b = n - a
    if b < 1:
        continue
    # print("{}, {} / {}, {}".format(a, sum_digits(a), b, sum_digits(b)))
    values.append(sum_digits(a) + sum_digits(b))

values.sort()
# print(values)
print("0" if len(values) == 0 else values[0])
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

k, s = map(int, input().split())

matched = []

for x in range(0, k + 1):
    for y in range(0, k + 1):
        z = s - x - y
        if 0 <= z and z <= k:
            matched.append((x, y, z))

# print(matched)
print(len(matched))

Fixed submission:
# -*- coding: utf-8 -*-

k, s = map(int, input().split())

count = 0

for x in range(0, k + 1):
    for y in range(0, k + 1):
        z = s - x - y
        if 0 <= z and z <= k:
            count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

k, s = map(int, input().split())

matched = []

for x in range(0, k + 1):
    for y in range(0, k + 1):
        for z in range(0, k + 1):
            if (x + y + z) == s:
                matched.append((x, y, z))

# print(matched)
print(len(matched))

Fixed submission:
# -*- coding: utf-8 -*-

k, s = map(int, input().split())

count = 0

for x in range(0, k + 1):
    for y in range(0, k + 1):
        z = s - x - y
        if 0 <= z and z <= k:
            count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
 
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1.0 / int(input())
after_reverse_num = 1.0 / before_reverse_num
print(str(round(after_reverse_num,5)))

Fixed submission:
n = int(input())
values = input().split()
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(values[_])
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))

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

before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))

Fixed submission:
n = int(input())
values = input().split()
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(values[_])
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))

Buggy python submission (verdict: Runtime Error):
n = int(input())
 
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())

after_reverse_num = 1 / before_reverse_num

print(after_reverse_num)

Fixed submission:
n = int(input())
values = input().split()
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(values[_])
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))

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

before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())
 
after_reverse_num = 1 / before_reverse_num

print(after_reverse_num)


Fixed submission:
n = int(input())
values = input().split()
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(values[_])
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
valuesDict = {}
for _ in range(N):
  A, B = map(int, input().split())
  valuesDict[A] = B if valuesDict[A] >= B else valuesDict[A]

answer = 0
for i in range(M):
  today = i + 1
  answer += valuesDict.get(today) if valuesDict.get(today) is not None else 0

print(answer)

Fixed submission:
import heapq
N, M = map(int,input().split())
reward = [[] for _ in range(M)]
for i in range(N):
  A,B = map(int,input().split())
  if A <= M:
    reward[A-1].append(B)
q = []
ans = 0
for day in range(M):
  for r in reward[day]:
    heapq.heappush(q,-r)
  if len(q) >0:
    ans += -heapq.heappop(q)
print(ans)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
valuesDict = {}
for i in range(N):
  today = i + 1
  A, B = map(int, input().split())
  valuesDict[today+A] += B
answer = 0
for i in range(M):
  today = i + 1
  answer += valuesDict[today]

print(answer)


Fixed submission:
import heapq
N, M = map(int,input().split())
reward = [[] for _ in range(M)]
for i in range(N):
  A,B = map(int,input().split())
  if A <= M:
    reward[A-1].append(B)
q = []
ans = 0
for day in range(M):
  for r in reward[day]:
    heapq.heappush(q,-r)
  if len(q) >0:
    ans += -heapq.heappop(q)
print(ans)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
valuesDict = {}
for i in range(N):
  A, B = map(int, input().split())
  valuesDict[i+A] += B

print(valuesDict[M])

Fixed submission:
import heapq
N, M = map(int,input().split())
reward = [[] for _ in range(M)]
for i in range(N):
  A,B = map(int,input().split())
  if A <= M:
    reward[A-1].append(B)
q = []
ans = 0
for day in range(M):
  for r in reward[day]:
    heapq.heappush(q,-r)
  if len(q) >0:
    ans += -heapq.heappop(q)
print(ans)
Buggy python submission (verdict: Runtime Error):
b = str(inut())

if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C')
  



Fixed submission:
b = input()
c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(c[b])

Buggy python submission (verdict: Runtime Error):
b = str(inut())

if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C')
  



Fixed submission:
b = input()
c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(c[b])
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
s = 0
for i in range(n):
  s += 1/a[i]

print(1/s)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
s = 0
for i in range(n):
  s += 1/a[i]

print(1/s)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())

q = m // n
for i in range(q):
    p = q - i
    r = m % p
    if r == 0:
        print(p)
        exit()


Fixed submission:
import math

n,m = map(int,input().split())

q = m // n

ret = 0
for i in range(1, int(math.sqrt(m))+1):
    if m % i == 0:
        if i <= q and ret < i:
            ret = i
        p = m//i
        if m//i <= q and ret < p:
            ret = p
print(ret)
Buggy python submission (verdict: Runtime Error):
import math

n = int(input())
print(2*n/math.gcd(2,n))


Fixed submission:
from fractions import gcd

n = int(input())
print(2*n//gcd(2,n))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = {i+1:int(input()) for i in range(n)}

def find(ad, nexti, cnt, s):
    cnt += 1
    s.add(nexti)
    if ad[nexti] == 2:
        return cnt
    elif ad[nexti] in s:
        return -1
    else:
        return find(ad, ad[nexti], cnt, s)

print(find(a, 1, 0, set()))


Fixed submission:
n = int(input())
a = {i+1:int(input()) for i in range(n)}
nexti = 1
for i in range(n):
    if a[nexti] == 2:
        print(i+1)
        exit()
    nexti = a[nexti]
print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = {i+1:int(input()) for i in range(n)}

def find(a, nexti, cnt, s):
    global n
    if cnt > n:
        return -1
    cnt += 1
    s.add(nexti)
    if a[nexti] == 2:
        return cnt
    elif a[nexti] in s:
        return -1
    else:
        return find(a, a[nexti], cnt, s)

print(find(a, 1, 0, set()))


Fixed submission:
n = int(input())
a = {i+1:int(input()) for i in range(n)}
nexti = 1
for i in range(n):
    if a[nexti] == 2:
        print(i+1)
        exit()
    nexti = a[nexti]
print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = {i+1:int(input()) for i in range(n)}

def find(a, nexti, cnt, s):
    cnt += 1
    s.add(nexti)
    if a[nexti] == 2:
        return cnt
    elif a[nexti] in s:
        return -1
    else:
        return find(a, a[nexti], cnt, s)

print(find(a, 1, 0, set()))


Fixed submission:
n = int(input())
a = {i+1:int(input()) for i in range(n)}
nexti = 1
for i in range(n):
    if a[nexti] == 2:
        print(i+1)
        exit()
    nexti = a[nexti]
print(-1)
Buggy python submission (verdict: Runtime Error):
import math
a,b,c = map(int, input().split())
r = math.gcd(a,b)
if c % r == 0:
    print('YES')
else:
    print('NO')
    


Fixed submission:
from fractions import gcd
a,b,c = map(int, input().split())
r = gcd(a,b)
if c % r == 0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
sa = input().split()

a = [0 for i in range(n)]
sumeven = 0
sumodd = 0
for i,sai in enumerate(sa):
    a[i] = int(sai)

    if i % 2 == 0:
        sumeven += a[i]
    else:
        sumodd += a[i]

ret = 0
sm = 0
for i,ai in enumerate(a):
    if i % 2 == 1:
            ret += max(-sm+1-ai,0)
            sm += max(ai, -sm+1)
        else:
            ret += max(sm+1 + ai, 0)
            sm += min(ai, -(sm+1))
ret2 = 0
sm = 0
for i,ai in enumerate(a):
    if i % 2 == 0:
        ret2 += max(-sm+1-ai,0)
        sm += max(ai, -sm+1)
    else:
        ret2 += max(sm+1 + ai, 0)
        sm += min(ai, -(sm+1))
        
print(max(ret,ret2))
    

Fixed submission:
n = int(input())
sa = input().split()

a = [0 for i in range(n)]
sumeven = 0
sumodd = 0
for i,sai in enumerate(sa):
    a[i] = int(sai)

    if i % 2 == 0:
        sumeven += a[i]
    else:
        sumodd += a[i]

ret = 0
sm = 0
for i,ai in enumerate(a):
    if i % 2 == 1:
        ret += max(-sm+1-ai,0)
        sm += max(ai, -sm+1)
    else:
        ret += max(sm+1 + ai, 0)
        sm += min(ai, -(sm+1))
ret2 = 0
sm = 0
for i,ai in enumerate(a):
    if i % 2 == 0:
        ret2 += max(-sm+1-ai,0)
        sm += max(ai, -sm+1)
    else:
        ret2 += max(sm+1 + ai, 0)
        sm += min(ai, -(sm+1))
        
print(min(ret,ret2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

p = 1
for i in range(1, n+1):
    p *= i
print(p%(10**9+7))


Fixed submission:
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Buggy python submission (verdict: Runtime Error):
s = input().split()
h = int(s[0])
w = int(s[1])
s = []
for i in range(h):
    s.append(input())

for i in range(h):
    row = ''
    for j in range(w):
        cnt = 0
        if s[i][j] == '#':
            row += '#'
            continue
        if i > 0 and j > 0 and s[i-1][j-1] == '#':
            cnt += 1
        if i > 0 and s[i-1][j] == '#':
            cnt += 1
        if i > 0 and j < w - 1 and s[i-1][j+1] == '#':
            cnt += 1
        if j > 0 and s[i][j-1] == '#':
            cnt += 1
        if j < w - 1 and s[i][j+1] == '#':
            cnt += 1
        if i < h - 1 and s[i+1][j-1] == '#':
            cnt += 1
        if i < h - 1 and s[i+1][j] == '#':
            cnt += 1
        if  i < h - 1 and j < w - 1 and s[i+1][j+1] == '#':
            cnt += 1
        row += str(cnt)
    print(row)


Fixed submission:
import math
n = int(input())
print(math.factorial(n)%(10**9+7))
Buggy python submission (verdict: Runtime Error):
st = input().split()
N = int(st[0])
x = int(st[1])
A = input().split()
a = []
for i in range(N):
     a.append(int(A[i]))   
a.append(0)
a.append(0)
ret = 0
for i in range(N):
    if a[i] + a[i + 1] > x :
        d1 = max((a[i] + a[i + 1]) - x,0)
        ret +=  min(a[i+1],d1)
        a[i+1] -=  min(a[i+1],d1)
        d1 = max((a[i] + a[i + 1]) - x,0)
        ret +=  min(a[i],d1)
        a[i] -=  min(a[i],d1)
print(ret)

Fixed submission:
st = input().split()
A = (st[0])
B = (st[1])
C = (st[2])
ret = A[0] + B[0] + C[0]

    
print(ret)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
while 1:
    s1 = s.replace('ST','',1)
    if len(s1) == len(s):
        break
    s = s1
print(str(len(s1)))

Fixed submission:
st = input()
sc = 0
tc = 0
for s in st:
    if s == "S":
        sc += 1
    if s == "T":
        if sc > 0:
            sc -= 1
        else:
            tc += 1

print(sc + tc)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
while 1:
    s1 = s.replace('ST','',1)
    if len(s1) == len(s):
        break
    s = s1
print(str(len(s1)) + "\n")


Fixed submission:
st = input()
sc = 0
tc = 0
for s in st:
    if s == "S":
        sc += 1
    if s == "T":
        if sc > 0:
            sc -= 1
        else:
            tc += 1

print(sc + tc)
Buggy python submission (verdict: Runtime Error):
rint('ABC' if int(input())<1000 else 'ABD')

Fixed submission:
print('ABC' if int(input())<1000 else 'ABD')
Buggy python submission (verdict: Time Limit Exceeded):
k,s=map(int,input().split())
a=0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z==s:
                a+=1
print(a)

Fixed submission:
k,s=map(int,input().split())
a=0
b=0
c=0
l=0
while l*2<=s and l<=k:
    if s-l*2<=k:
        b+=1
    l+=1
if s%3==0:
    a+=1
    b-=1
for x in range(k+1):
    for y in range(x+1,k+1):
        if k>=s-x-y>y:
            c+=1
print(a+3*b+6*c)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
b=['A','B','C','D','E','F','G','H']
for k in range(h):
    a=list(input().split())
    for l in range(w):
        if a[l]=='snuke':
            print(b[l]+str(k+1))

Fixed submission:
h,w=map(int,input().split())
b=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for k in range(h):
    a=list(input().split())
    for l in range(w):
        if a[l]=='snuke':
            print(b[l]+str(k+1))
Buggy python submission (verdict: Runtime Error):
n,l=map(int,input().split())
a=[]
b=''
for k in range(n):
    a.append(input())
a.sort()
for i in range(l):
   b+=a[i]
print(b)

Fixed submission:
n,l=map(int,input().split())
a=[]
b=''
for k in range(n):
    a.append(input())
a.sort()
for i in range(n):
   b+=a[i]
print(b)
Buggy python submission (verdict: Runtime Error):
a,s = [input() for i in  range(2)]

a = int(a)

if a < 3200:
  print(red)
else:
  print(s)

Fixed submission:
a,s = [input() for i in  range(2)]

a = int(a)

if a < 3200:
  print("red")
else:
  print(s)
Buggy python submission (verdict: Runtime Error):
a=input()
s=input()
if a>=3200:
  print(s)
else:
  print("red")

Fixed submission:
a=int(input())
s=input()
if a>= 3200:
  print(s)
else:
  print("red")
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()

def cnt_AC(n):
    return S[0:n].count("AC")

for i in range(Q):
    l, r = map(int, input().split())
    print(cnt_AC(r) - cnt_AC(l))

Fixed submission:
N, Q = map(int, input().split())
S = input()

t = [0] * (N + 1)

for i in range(N):
    t[i + 1] = t[i] + (1 if S[i:i + 2] == "AC" else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()

for i in range(Q):
    l, r = map(int, input().split())
    print(S[l - 1:r].count("AC"))

Fixed submission:
N, Q = map(int, input().split())
S = input()

t = [0] * (N + 1)

for i in range(N):
    t[i + 1] = t[i] + (1 if S[i:i + 2] == "AC" else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()

for i in range(Q):
    l, r = map(int, input().split())
    bubun = S[l - 1:r]
    cnt = 0
    for j in range(len(bubun)):
        if j >= len(bubun) or j + 1 >= len(bubun):
            continue
        elif bubun[j] == "A" and bubun[j + 1] == "C":
            cnt += 1
    print(cnt)

Fixed submission:
N, Q = map(int, input().split())
S = input()

t = [0] * (N + 1)

for i in range(N):
    t[i + 1] = t[i] + (1 if S[i:i + 2] == "AC" else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()

for i in range(Q):
    l, r = map(int, input().split())
    bubun = S[l - 1:r]
    print(bubun.count("AC"))

Fixed submission:
N, Q = map(int, input().split())
S = input()

t = [0] * (N + 1)

for i in range(N):
    t[i + 1] = t[i] + (1 if S[i:i + 2] == "AC" else 0)

for i in range(Q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])
Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
xor = 0

for i in range(A, B + 1):
        xor ^= i

print(xor)

Fixed submission:
def XOR_sum(n):
    m = n + 1
    if m % 4 == 0:
        return 0
    elif m % 4 == 1:
        return n
    elif m % 4 == 2:
        return 1
    else:
        return 1 ^ n
        

A, B = map(int, input().split())

a = XOR_sum(A - 1)
b = XOR_sum(B)

print(a ^ b)

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())
lst = []
xor = 0

for i in range(A, B + 1):
    if xor == 0:
        xor += i
    else:
        xor ^= i

print(xor)

Fixed submission:
def XOR_sum(n):
    m = n + 1
    if m % 4 == 0:
        return 0
    elif m % 4 == 1:
        return n
    elif m % 4 == 2:
        return 1
    else:
        return 1 ^ n
        

A, B = map(int, input().split())

a = XOR_sum(A - 1)
b = XOR_sum(B)

print(a ^ b)
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
cnt = 0
for X in range(K + 1):
    for Y in range(K + 1):
        for Z in range(K + 1):
            if X + Y + Z == S:
                cnt += 1
print(cnt)

Fixed submission:
K, S = map(int,input().split())
cnt = 0
for X in range(0, K + 1):
    for Y in range(0, K + 1):
        if 0 <= S - X - Y <= K:
            cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int,input().split())
cnt = 0
for X in range(0, K + 1):
    for Y in range(0, K + 1):
        for Z in range(0, K + 1):
            if X + Y + Z == S:
                cnt += 1
print(cnt)

Fixed submission:
K, S = map(int,input().split())
cnt = 0
for X in range(0, K + 1):
    for Y in range(0, K + 1):
        if 0 <= S - X - Y <= K:
            cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = 0
numbers = array()

N = int(input())
numbers = input().split()
numbers = [1/int(i) for i in numbers]

print(1/sum(numbers))


Fixed submission:
N = 0
numbers = []

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(1/sum(numbers))

Buggy python submission (verdict: Runtime Error):
N = 0
numbers = array()

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(1/sum(numbers))

Fixed submission:
N = 0
numbers = []

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(1/sum(numbers))

Buggy python submission (verdict: Runtime Error):
N = 0
numbers = array()

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(sum(numbers))

Fixed submission:
N = 0
numbers = []

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(1/sum(numbers))
Buggy python submission (verdict: Runtime Error):
N = int(input())
nums = [int(i) for i in input().split()]
LOOP = int(np.log2(N))+1
LOOP_N = N

for _ in range(LOOP):
    is_odd = (LOOP_N%2 == 1)
    LOOP_N = math.ceil(LOOP_N/2)
    nums = [nums[2*i] if (i==LOOP_N-1 and is_odd) else (nums[2*i]+nums[2*i+1])/2  for i in range(LOOP_N)]

print(nums[0])

Fixed submission:
n = int(input())
nums = sorted(map(lambda x: int(x), input().split(' ')))
res = nums[0] / 2**n
for index, num in enumerate(nums):
    res += num / 2**(n - index)
print(res)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(1,n + 1):
	if len(str(i)) % 2 == 1:
		ans += 1
print(ans) 

Fixed submission:
a, b, c = input().split()
x = int(a) - int(b)
if int(c) <= x:
	print(0)
else:
	y = int(c) - x
	print(y)

Buggy python submission (verdict: Runtime Error):
a, b, c = int(input().split()) 
x = a - b
if c <= x:
	print(0)
else:
	y = c - x
	print(y)

Fixed submission:
a, b, c = input().split()
x = int(a) - int(b)
if int(c) <= x:
	print(0)
else:
	y = int(c) - x
	print(y)

Buggy python submission (verdict: Runtime Error):
a, b, c = int(input().split())
x = a - b
y = c - x
print(y)

Fixed submission:
a, b, c = input().split()
x = int(a) - int(b)
if int(c) <= x:
	print(0)
else:
	y = int(c) - x
	print(y)

Buggy python submission (verdict: Runtime Error):
a, b, c = int(input().split())
x = c - (a - b)
print(x)

Fixed submission:
a, b, c = input().split()
x = int(a) - int(b)
if int(c) <= x:
	print(0)
else:
	y = int(c) - x
	print(y)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(1,n + 1):
	if len(int(i)) % 2 == 1:
		ans += 1
print(ans) 

Fixed submission:
n = int(input())
ans = 0
for i in range(1,n + 1):
	if len(str(i)) % 2 == 1:
		ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
print('{:.16g}'.format(1 / sum(1 /x for x in A)))

Fixed submission:
a=int(input())
s=input()
print(s if a >=3200 else 'red')