Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = str(input())
n = str(input())
ans = 0
for i in range(len(s)):
    s = s[1:] + s[0]
    if s == n:
        ans = 1
        break-

if ans == 1:
    print("Yes")
else:
    print("No")


Fixed submission:
s = str(input())
n = str(input())
ans = 0
for i in range(len(s)):
    s = s[1:] + s[0]
    if s == n:
        ans = 1
        break

if ans == 1:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = a[1]
c = b[0]

print("A{}C".format(c))

Fixed submission:
a = list(map(str,input().split()))

print("A{}C".format(a[1][0]))

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))

print("A{}C".format(a[1]))

Fixed submission:
a = list(map(str,input().split()))

print("A{}C".format(a[1][0]))
Buggy python submission (verdict: Runtime Error):
a = int(inpit())
ans = 0

if i in range(a):
  i += 1
  ans = ans + i
  
print(ans)

Fixed submission:
a = int(input())
ans = 0
 
for i in range(a):
  i += 1
  ans = ans + i
  
print(ans)
Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())
list = []
papa = ""
for i in range(b):
  list.append(input()) 
c = sorted(list)
for x in c:
  papa += x
print(papa)

Fixed submission:
a = list(map(int,input().split()))

if a.count(5) == 2:
  if a.count(7) == 1:
    print("YES")
  else:
    print("NO")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())
c_list = [input() for i in range(a)]
c.sort()
print("".join(c))

Fixed submission:
a , b = map(int,input().split())
c_list = sorted([input() for i in range(a)])
print("".join(c_list))

Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())
c_list = [input() for i in range(a)]
c.sort()
print("".join(c))

Fixed submission:
a , b = map(int,input().split())
c_list = sorted([input() for i in range(a)])
print("".join(c_list))

Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())
list = []
papa = ""
for i in range(b):
  list.append(input()) 
c = sorted(list)
for x in c:
  papa += x
print(papa)

Fixed submission:
a , b = map(int,input().split())
c_list = sorted([input() for i in range(a)])
print("".join(c_list))

Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())
 
 
list = []
papa = ""
 
for i in range(b):
  list.append(input())
  
list.sort()
for x in list:
  papa += x
print(papa)

Fixed submission:
a , b = map(int,input().split())
c_list = sorted([input() for i in range(a)])
print("".join(c_list))

Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())


list = []

for i in range(b):
  list.append(input())
  
list.sort()
print(join(list))


Fixed submission:
a , b = map(int,input().split())
c_list = sorted([input() for i in range(a)])
print("".join(c_list))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1
i = 0
while i < len(A):
    if 0 in A:
        sum = 0
        break
    sum *= A[i]
    i+=1
    if sum > 1000000000000000000:
      break

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1

if 0 in A:
    sum = 0

else:
    for i in range(len(A)):
        sum *= A[i]
        if sum > 1000000000000000000:
            break
    
if sum > 1000000000000000000:
    sum = -1

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1
i = 0
while i < len(A):
    sum *= A[i]
    i+=1
    if sum > 1000000000000000000 and 0 not in A:
      break

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1

if 0 in A:
    sum = 0

else:
    for i in range(len(A)):
        sum *= A[i]
        if sum > 1000000000000000000:
            break
    
if sum > 1000000000000000000:
    sum = -1

print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1
i = 0
while i < len(A):
    sum *= A[i]
    i+=1

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
N = int(input())
A = input().split()
A = [int(s) for s in A]

sum = 1

if 0 in A:
    sum = 0

else:
    for i in range(len(A)):
        sum *= A[i]
        if sum > 1000000000000000000:
            break
    
if sum > 1000000000000000000:
    sum = -1

print(sum)
Buggy python submission (verdict: Runtime Error):
import math
from decimal import Decimal


A, B = map(float, input().split())
answer = A * Decimal(B)

print(math.floor(answer))

Fixed submission:
import math
from decimal import Decimal

A = input().split()
answer = Decimal(A[0]) * Decimal(A[1])

print(math.floor(answer))
Buggy python submission (verdict: Runtime Error):
N = int(input())

height = input()
height = height.split()
height = [int(s) for s in height]

count = 0

for i in range(N):
  for j in range(i+1, N):
    if j-i == height[i] + height[j]:
      count += 1

print(count)

Fixed submission:
a = input()

if a == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100000):
  for j in range(0, 100000):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Fixed submission:
a = input()

if a == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy python submission (verdict: Runtime Error):
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100):
  for j in range(0, 100):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Fixed submission:
a = input()

if a == 'ABC':
  print('ARC')
else:
  print('ABC')
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100000):
  for j in range(0, i):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Fixed submission:
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = -j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 10000):
  for j in range(0, 10000):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Fixed submission:
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = -j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(0, 100000):
  for j in range(0, 100000):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))

Fixed submission:
X = int(input())
 
flag = 0
A = 0
B = 0
 
for i in range(-120, 120):
  for j in range(-120, 120):
    if i**5 - j**5 == X:
      A = i
      B = j
      break
    elif i**5 + j**5 == X:
      A = i
      B = -j
      break
    elif -i**5 - j**5 == X:
      A = -i
      B = j
      break
print(str(A) + ' ' + str(B))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

height = input()
height = height.split()
height = [int(s) for s in height]

count = 0

for i in range(N):
  for j in range(i+1, N):
    if j-i == height[i] + height[j]:
      count += 1

print(count)

Fixed submission:
import collections

N = int(input())

height = input()
height = height.split()
height = [int(s) for s in height]

count = 0


d = dict(collections.Counter([i + height[i] for i in range(N)]))
ans = sum([d.get(i - height[i], 0) for i in range(N)])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

height = input()
height = height.split()
height = [int(s) for s in height]

count = 0

for i in range(N):
  for j in range(i+1, N):
    if abs(i-j) == abs(height[i] + height[j]):
      count += 1

print(count)

Fixed submission:
import collections

N = int(input())

height = input()
height = height.split()
height = [int(s) for s in height]

count = 0


d = dict(collections.Counter([i + height[i] for i in range(N)]))
ans = sum([d.get(i - height[i], 0) for i in range(N)])
print(ans)
Buggy python submission (verdict: Runtime Error):
N,D=map(int,input().split())
ans=0

for i in  range(N):
    x,y=map(int,input().split())
    if(D*D>=x*x+y*y):ans+=1
    
    
print(ans)

Fixed submission:
x=int(input())
if(x>=30):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# if x < y:
#     z = x
# elif True:
#     z = y
# else:
#     z = 100
import sys,os,math
from collections import Counter, defaultdict
import bisect
from sys import stdin, stdout
from itertools import repeat

sys.stdin = open('input')
# n, k = map(int, raw_input().split())
# da = map(int, raw_input().split())
# db = map(int, raw_input().split())

def main():
    n, m = map(int, raw_input().split())
    bf, af = [10000000 for i in range(1<<n)], [10000000 for i in range(1<<n)]
    bf[0] = 0
    for i in range(m):
        a, b = map(int, raw_input().split())
        ad = 0
        for st in map(int, raw_input().split()):
            ad |= 1<<(st-1)

        for st in range(1<<n):
            af[st|ad] = min(bf[st|ad], bf[st]+a, af[st|ad])
        # print af
        bf, af = af, bf
    if bf[(1<<n)-1] == 10000000:
        print -1
    else:
        print bf[(1<<n)-1]



main()


Fixed submission:
# -*- coding: utf-8 -*-
# if x < y:
#     z = x
# elif True:
#     z = y
# else:
#     z = 100
import sys,os,math
from collections import Counter, defaultdict
import bisect
from sys import stdin, stdout
from itertools import repeat


# n, k = map(int, raw_input().split())
# da = map(int, raw_input().split())
# db = map(int, raw_input().split())

def main():
    n, m = map(int, raw_input().split())
    bf, af = [10000000 for i in range(1<<n)], [10000000 for i in range(1<<n)]
    bf[0] = 0
    for i in range(m):
        a, b = map(int, raw_input().split())
        ad = 0
        for st in map(int, raw_input().split()):
            ad |= 1<<(st-1)
        for st in range(1<<n):
            af[st|ad] = min(bf[st|ad], bf[st]+a, af[st|ad])
        for st in range(1<<n):
            af[st] = min(af[st], bf[st])
        bf, af = af, bf
    if bf[(1<<n)-1] == 10000000:
        print -1
    else:
        print bf[(1<<n)-1]



main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
O = input()

def check(O):
    idx = [i for i, s in enumerate(O) if s == 'R' and i != 0]
    for i in idx:
        if O[i-1] == 'W':
            return False
    return True

def swap(O, t1, t2):
    L = [x for x in O]
    tmp = L[t1]
    L[t1] = L[t2]
    L[t2] = tmp
    return ''.join(L)

count = 0
while not check(O):
    ridx = [i for i, s in enumerate(O) if s == 'R']
    wrdx = [i for i, s in enumerate(O) if s == 'W']
    O = swap(O, max(ridx), min(wrdx))
    count += 1
    
print(count)

Fixed submission:
N = int(input())
O = input()
ridx = [i for i, s in enumerate(O) if s == 'R']
n = len([i for i in ridx if i >= len(ridx)])
print(n)
Buggy python submission (verdict: Runtime Error):
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(D):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)      

Fixed submission:
import math
N,D = [int(x) for x in input().split()]
count = 0
for i in range(0,N):
  X,Y = [int(x) for x in input().split()]
  if math.sqrt(X**2 + Y**2) <= D:
      count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
C = input()
cnt =0
maxlen = len(C)
while( "WR" in C ):
    cnt+=1
    tmp = C.index('W')
    tmp2 = C.rindex('R')
    tmp3 = ""
    tmp4 = ""
    tmp5 = ""

    if tmp != 0:
      tmp3 = C[0:tmp-1]
    if tmp2 != maxlen-1:    
      tmp5 = C[tmp2+1:maxlen]
    if tmp2-tmp > 1:
      tmp4 = C[tmp+1:tmp2]
      
    C = tmp3+"R"+ tmp4 +"W"+ tmp5

    
print(cnt)
    


Fixed submission:
N = int(input())
C = input()

tmp = C
tmp2 = len(tmp.replace("W",""))
tmp3 = C[0:tmp2]
ans = len(tmp3.replace("R",""))   
print(ans)
Buggy python submission (verdict: Runtime Error):
val = input()
h, n = [int(x) for x in val.split()]
val = input()
a = [int(x) for x in val.split()]

sum = a.sum()
if h - sum <= 0:
  print("Yes")
else:
  print("No")


Fixed submission:
val = input()
h, n = [int(x) for x in val.split()]
val = input()
a = [int(x) for x in val.split()]
 
sum = sum(a)
if h - sum <= 0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
if input() >= 30:
    print('Yes')
else:
    print('No')

Fixed submission:
if int(input()) >= 30:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
if X >= 30:
    print('Yes')
else:
    print('No')

Fixed submission:
if int(input()) >= 30:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math
import collections


def main():
  N = int(input())
  S = [int(input()) for _ in range(N)]
  
  A = collections.Counter(S)
  
  print('AC × ' + A['AC'])
  print('WA × ' + A['WA'])
  print('TLE × ' + A['TLE'])
  print('RE × ' + A['RE'])
  
  
  
main()

Fixed submission:
import math
import collections


def main():
  N = int(input())
  S = [input() for _ in range(N)]
  
  A = collections.Counter(S)
  
  
  print('AC x ' + str(A['AC']))
  print('WA x ' + str(A['WA']))
  print('TLE x ' + str(A['TLE']))
  print('RE x ' + str(A['RE']))
  
  
  
main()
Buggy python submission (verdict: Runtime Error):
a = input()
x = int(a)

for i, k in x:
  if k == 0:
    print(i)
    break;

Fixed submission:
a = list(map(int, input().split()))

if a[0] == 0:
  print(1)
elif a[1] == 0:
  print(2)
elif a[2] == 0:
  print(3)
elif a[3] == 0:
  print(4)
else:
  print(5)
Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())

print(x*y)

Fixed submission:
a, b = map(int, input().split())

print(a * b)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
 
ans = 1
 
for i in A:
  ans *= i
  
  if ans > 10 ** 18:
  print(-1)
  return 
  
 
  
print(ans)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
 
    if 0 in A:
        print(0)
        return
    
    ans = 1
 
    for i in A:
        ans *= i
      
        if ans > 10 ** 18:
            print(-1)
            return 
      
    print(ans)  

main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
 
ans = 1
 
for i in N:
  ans *= A[i]
  
  if ans > 10 ** 18:
  print(-1)
  return 
  

  
print(ans)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
 
    if 0 in A:
        print(0)
        return
    
    ans = 1
 
    for i in A:
        ans *= i
      
        if ans > 10 ** 18:
            print(-1)
            return 
      
    print(ans)  

main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
 
ans = 1

for i in N:
  ans *= A[i]
  
if ans > 10 ** 18:
  ans = -1
  
print(ans)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
 
    if 0 in A:
        print(0)
        return
    
    ans = 1
 
    for i in A:
        ans *= i
      
        if ans > 10 ** 18:
            print(-1)
            return 
      
    print(ans)  

main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
 
for i in N:
  ans *= A[i]
  
if ans > 10**18:
  ans = -1
  
print(ans)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
 
    if 0 in A:
        print(0)
        return
    
    ans = 1
 
    for i in A:
        ans *= i
      
        if ans > 10 ** 18:
            print(-1)
            return 
      
    print(ans)  

main()

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

for i in N:
  ans *= A[i]
  
print(ans)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
 
    if 0 in A:
        print(0)
        return
    
    ans = 1
 
    for i in A:
        ans *= i
      
        if ans > 10 ** 18:
            print(-1)
            return 
      
    print(ans)  

main()
Buggy python submission (verdict: Runtime Error):
def main():
  a = int(input())
  
  i = a % 10
  
  if i == 2 or 4 or 5 or 7 or 9:
    print('hon')
    return
  elif i == 0 or 1 or 6 or 8:
  	print('pon')
    return
  else:
    print('bon')
main()

Fixed submission:
def main():
  a = int(input())
  x = a % 10
  
  if x in (2,4,5,7,9):
    print('hon')
    return
  elif x in (0,6,1,8):
    print('pon')
    return
  else:
    print('bon')
  
main()
Buggy python submission (verdict: Runtime Error):
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k-1:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Fixed submission:
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in range(k):
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Buggy python submission (verdict: Runtime Error):
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Fixed submission:
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in range(k):
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()
Buggy python submission (verdict: Runtime Error):
def main():
  x = int(input())
  
  total = 100
  year = 0
  
  while total < x:
    total = math.floor(total * 1.01)
    year += 1
  
  print(year)
  
  
  
main()

Fixed submission:
def main():
  x = int(input())
  
  total = 100
  year = 0
  
  while total < x:
    #total = math.floor(total * 1.01)
    total += total // 100
    year += 1
  
  print(year)
  
  
  
main()
Buggy python submission (verdict: Runtime Error):
def main():
  n = int(input())
  A = list(map(int, input().split()))
  
  num = [0] * n
  
  # for i in range(0, n-1):
  #   for k in range(0, len(A)):
  #     if A[k] == i+1:
  #       num[i] += 1
  
  for i in range(0, n-1):
    num[A[i]] += 1
  
  for k in range(1, n+1):    
    print(num[k])
  
main()

Fixed submission:
def main():
  n = int(input())
  A = list(map(int, input().split()))
  
  num = [0] * n + [0]
  
  # for i in range(0, n-1):
  #   for k in range(0, len(A)):
  #     if A[k] == i+1:
  #       num[i] += 1
  
  for i in range(0, n-1):
    num[A[i]] += 1
  
  for k in range(1, n+1):    
    print(num[k])
  
main()
Buggy python submission (verdict: Runtime Error):
import math
import collections

def main():
  N = int(input())
  S = list()
  S = [input() for _ in range(N)]
  
  s = collections.counter(S)
  
  MaxCount = max(s.values())
  
  ans = []
  
  for key, value in s.items():
    if value == MaxCount:
      ans.append(key)
                 
  ans.sort()
  
  for i in ans:
    print(ans[i])
  
  
  
  
main()

Fixed submission:

import math
import collections

def main():
  N = int(input())
  S = list()
  S = [input() for _ in range(N)]
  
  s = collections.Counter(S)
  
  MaxCount = max(s.values())
  
  ans = []
  
  for key, value in s.items():
    if value == MaxCount:
      ans.append(key)
                 
  ans.sort()
  
  for i in ans:
    print(i)
  
  
  
  
main()
Buggy python submission (verdict: Runtime Error):
def main():
  N = int(input())
  S = input()
  
  cnt = 0
  
  for i in range(N):
    if S[i] == 'A':
      if S[i+1] == 'B':
        if S[i+2] == 'C':
          cnt += 1
  print(cnt)
  
  
main()


Fixed submission:
def main():
  N = int(input())
  S = input()
  
  cnt = 0
  
  for i in range(N-2):
    if S[i] == 'A':
      if S[i+1] == 'B':
        if S[i+2] == 'C':
          cnt += 1
  print(cnt)
  
  
main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
  A, B, K = map(int, input().split())
  
  for _ in range(K):
    if A >= 1:
      A -= 1
      continue
    elif B >= 1:
      B-= 1
      continue
    elif A == 0 and B == 0:
      break
  
  print(A, B)
  
  
  
main()

Fixed submission:
def main():
  A, B, K = map(int, input().split())
  
  if K <= A:
    print(A - K, B)
  elif K > A and B >= K - A:
    print(0, B - (K - A))
  elif K > A and B < (K - A):
    print(0, 0)
  
  
  
main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  A, B, K = map(int, input().split())
  
  for _ in range(K):
    if A >= 1:
      A -= 1
      continue
    elif B >= 1:
      B-= 1
      continue
  
  print(A, B)
  
  
  
main()

Fixed submission:
def main():
  A, B, K = map(int, input().split())
  
  if K <= A:
    print(A - K, B)
  elif K > A and B >= K - A:
    print(0, B - (K - A))
  elif K > A and B < (K - A):
    print(0, 0)
  
  
  
main()
Buggy python submission (verdict: Runtime Error):
L, R, d = [int(x) for x in input().split()]
compteur = 0

for i in range(L, R+1):
  if i%d == 0:
    k += 1
   

Fixed submission:
L, R, d = [int(x) for x in input().split()]
compteur = 0

for i in range(L, R+1):
  if i%d == 0:
    compteur += 1
   
print(compteur)