Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[2]
if (b-a)>n :
    print("OK")
elif n==1 :
  print("OK")
else :
    print("NG")

Fixed submission:
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
rem=(a%n)
left=n-rem
if b>=(left+a) :
    print("OK")
elif a%n ==0 or b%n==0:
    print("OK")
else :
    print("NG")

Buggy python submission (verdict: Runtime Error):
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[2]
if (b-a)>n :
    print("Yes")
else :
    print("No")

Fixed submission:
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
rem=(a%n)
left=n-rem
if b>=(left+a) :
    print("OK")
elif a%n ==0 or b%n==0:
    print("OK")
else :
    print("NG")
Buggy python submission (verdict: Runtime Error):
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
n=temp[2]
if (b-1)<n :
  x=(b-1)
else :
  x=n
v=((a*x)//b)-(a*(x//b))
print v
  
  

Fixed submission:
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
n=temp[2]
if (b-1)<n :
  x=(b-1)
else :
  x=n
v=((a*x)//b)-(a*(x//b))
print(v)
Buggy python submission (verdict: Runtime Error):
N=int(input())
M=int(input())
arr=list(map(int,input().rstrip().split()))
summ=0
for i in range(M) :
	summ+=arr[i]  
if summ>=N :
	print(-1)
else :
  print(N-summ)

Fixed submission:
arr=list(map(int,input().rstrip().split()))
N=arr[0]
M=arr[1]
arr=list(map(int,input().rstrip().split()))
summ=0
for i in range(M) :
    summ+=arr[i]
if summ>N :
    print(-1)
else :
    print(N-summ)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import groupby
def main():
    n=int(input())
    aa=sorted(map(int,input().split()))
    d={}
    for k,g in groupby(aa):
        d[k] = len(list(g))
    q=int(input())
    bc=[]
    for _ in range(q):
        b,c=map(int,input().split())
        bc.append((b,c))
    for b,c in bc:
        if b in d:
            d[c] = d.setdefault(c, 0) + d[b]
            del d[b]
        print(sum(k*v for k,v in d.items()))
main()

Fixed submission:
from itertools import groupby
def main():
    n=int(input())
    aa=sorted(map(int,input().split()))
    d={}
    for k,g in groupby(aa):
        d[k] = len(list(g))
    q=int(input())
    bc=[]
    for _ in range(q):
        b,c=map(int,input().split())
        bc.append((b,c))
    s = sum(k*v for k,v in d.items())
    for b,c in bc:
        if b in d:
            s += (c-b)*d[b]
            d[c] = d.setdefault(c, 0) + d[b]
            del d[b]
        print(s)
main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    aa=input().split()
    x=1
    for a in aa:
        x*=int(a)
    if x>1000000000000000000:
        print(-1)
    else:
        print(x)
main()

Fixed submission:
def main():
    n=int(input())
    aa=map(int,input().split())
    x=1
    for a in aa:
        if a == 0:
            print(0)
            return
        if x<1000000000000000000:
            x*=a
    if x>1000000000000000000:
        print(-1)
    else:
        print(x)
main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    aa=map(int,input().split())
    x=1
    for a in aa:
        x*=a
    if x>1000000000000000000:
        print(-1)
    else:
        print(x)
main()

Fixed submission:
def main():
    n=int(input())
    aa=map(int,input().split())
    x=1
    for a in aa:
        if a == 0:
            print(0)
            return
        if x<1000000000000000000:
            x*=a
    if x>1000000000000000000:
        print(-1)
    else:
        print(x)
main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    for i,a in enumerate(aa,1):
        x=i-a
        if x < 1:
            continue
        if x not in ll:
            ll[x]=[i]
        else:
            ll[x].append(i)
    c=0
    for i,a in enumerate(aa,1):
        x=i+a
        if x not in ll:
            continue
        c+=sum(j>i for j in ll[x])
    print(c)
main()

Fixed submission:
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    c=0
    for i,a in enumerate(aa,1):
        x=i-a
        if x in ll:
            c+=len(ll[x])
        y=i+a
        if y in ll:
            ll[y].append(i)
        else:
            ll[y]=[i]
    print(c)
main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    for i,a in enumerate(aa,1):
        x=i-a
        if x not in ll:
            ll[x]=[i]
        else:
            ll[x].append(i)
    c=0
    for i,a in enumerate(aa,1):
        x=i+a
        if x not in ll:
            continue
        c+=sum(j>i for j in ll[x])
    print(c)
main()

Fixed submission:
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    c=0
    for i,a in enumerate(aa,1):
        x=i-a
        if x in ll:
            c+=len(ll[x])
        y=i+a
        if y in ll:
            ll[y].append(i)
        else:
            ll[y]=[i]
    print(c)
main()

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    c=0
    for i,a in enumerate(aa):
        for j in range(i+a+1,n):
            if j-i==a+aa[j]:
                c+=1
    print(c)
main()

Fixed submission:
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    c=0
    for i,a in enumerate(aa,1):
        x=i-a
        if x in ll:
            c+=len(ll[x])
        y=i+a
        if y in ll:
            ll[y].append(i)
        else:
            ll[y]=[i]
    print(c)
main()

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    c=0
    for i,j in combinations(range(n), 2):
        if j-i==aa[i]+aa[j]:
            c+=1
    print(c)
main()

Fixed submission:
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    ll={}
    c=0
    for i,a in enumerate(aa,1):
        x=i-a
        if x in ll:
            c+=len(ll[x])
        y=i+a
        if y in ll:
            ll[y].append(i)
        else:
            ll[y]=[i]
    print(c)
main()
Buggy python submission (verdict: Runtime Error):
def main():
    s=input()
    c=0
    for i in range(len(s)):
        for j in range(i+5, len(s)+1):
            if int(s[i:j])%2019==0:
                c+=1
    print(c)
main()

Fixed submission:
def main():
    s,w=map(int,input().split())
    print('unsafe' if w>=s else 'safe')
main()
Buggy python submission (verdict: Runtime Error):
h,a=def main():
    h,a=map(int,input().split())
    if h % a:
        print(h//a+1)
    else:
        print(h//a)

main()

Fixed submission:
def main():
    h,a=map(int,input().split())
    if h % a:
        print(h//a+1)
    else:
        print(h//a)
 
main()
Buggy python submission (verdict: Runtime Error):
from math import gcd
def main():
    a,b=map(int,input().split())
    print(a*b//gcd(a,b))

main()

Fixed submission:
from fractions import gcd
def main():
    a,b=map(int,input().split())
    print(a*b//gcd(a,b))
 
main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    i=1
    while True:
        try:
            j=aa.index(i)
        except ValueError:
            break
        aa=aa[j+1:]
        i+=1
    if i<=1:
        print(-1)
    else:
        print(n-i+1)

main()

Fixed submission:
def main():
    n=int(input())
    aa=list(map(int,input().split()))
    b=0
    i=1
    while True:
        try:
            j=aa.index(i,b)
        except ValueError:
            break
        b=j+1
        i+=1
    if i<=1:
        print(-1)
    else:
        print(n-i+1)

main()
Buggy python submission (verdict: Runtime Error):
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=sorted(list(map(int,input().split())))
c=0
lll=len(ll)
for i in range(lll-2):
    for j in range(i+1, lll-1):
        uk = bisect_left(ll, ll[i] + ll[j], j+1)
        lk = bisect_right(ll, abs(ll[j] - ll[i]), j+1, uk)
        c+=uk-lk
print(c)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
a,b=map(int,input().split())
if b*2>=a:
    print(0)
else:
    print(a-b*2)
Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=sorted(list(map(int,input().split())))
c=0
lll=len(ll)
for i in range(lll-2):
    for j in range(i+1, lll-1):
        uk = bisect_left(ll, ll[i] + ll[j], j+1)
        lk = bisect_right(ll, abs(ll[j] - ll[i]), j+1, uk)
        c+=uk-lk
print(c)

Fixed submission:
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=sorted(list(map(int,input().split())))
c=0
lll=len(ll)
for i in range(lll-2):
    for j in range(i+1, lll-1):
        uk = bisect_left(ll, ll[i] + ll[j], j+1)
        lk = bisect_right(ll, abs(ll[j] - ll[i]), j+1, uk)
        c+=uk-lk
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=map(int,input().split())
from itertools import combinations
print(sum(1 for a,b,c in combinations(ll,3) if a<b+c and b<c+a and c<a+b))

Fixed submission:
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=sorted(list(map(int,input().split())))
c=0
lll=len(ll)
for i in range(lll-2):
    for j in range(i+1, lll-1):
        uk = bisect_left(ll, ll[i] + ll[j], j+1)
        lk = bisect_right(ll, abs(ll[j] - ll[i]), j+1, uk)
        c+=uk-lk
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=map(int,input().split())
from itertools import combinations
print(sum(1 for a,b,c in combinations(ll,3) if a<b+c and b<c+a and c<a+b))

Fixed submission:
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
ll=sorted(list(map(int,input().split())))
c=0
lll=len(ll)
for i in range(lll-2):
    for j in range(i+1, lll-1):
        uk = bisect_left(ll, ll[i] + ll[j], j+1)
        lk = bisect_right(ll, abs(ll[j] - ll[i]), j+1, uk)
        c+=uk-lk
print(c)
Buggy python submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()
n,k,q=map(int,input().split())
pt=[0 for _ in range(n)]
for _ in range(q):
    a = int(input())
    pt[a-1] += 1
base=q-k
for p in pt:
    print("No" if p <= base else "Yes")

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
s=input()
w=["Sunny","Cloudy","Rainy","Sunny"]
print(w[w.index(s)+1])
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=[]
for _ in range(n):
    aa.append(int(input()))
a = aa[0]
b = max(aa[1:])
print(b)
for i in range(1,n):
    if a >= b:
        print(a)
        b = a
        a = aa[i]
    else:
        if aa[i] != b:
            print(b)
            a = aa[i]
        else:
            a = aa[i]
            b = max(aa[:i]+aa[i+1:])
            print(b)

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=[]
for i in range(n):
    aa.append(int(input()))
ma = max(aa)
if aa.count(ma) > 1:
    for _ in range(n):
        print(ma)
else:
    for i in range(n):
        if aa[i] != ma:
            print(ma)
        else:
            print(max(aa[:i]+aa[i+1:]))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=[]
for _ in range(n):
    aa.append(int(input()))
for i in range(n):
    print(max(aa[:i] + aa[i+1:]))

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=[]
for i in range(n):
    aa.append(int(input()))
ma = max(aa)
if aa.count(ma) > 1:
    for _ in range(n):
        print(ma)
else:
    for i in range(n):
        if aa[i] != ma:
            print(ma)
        else:
            print(max(aa[:i]+aa[i+1:]))
Buggy python submission (verdict: Runtime Error):
from itertools import combinations
n=int(input())
xs = []
for _ in range(n):
    x,y=map(int,input().split())
    xs.append((x,y))

def func(c):
    p,q=(xs[c[0]][0]-xs[c[1]][0],xs[c[0]][1]-xs[c[1]][1])
    ys=[(x,y) for x,y in xs if (x-p,y-q) not in xs]
    return len(ys)

c = combinations(range(n),2)
print(min(map(func, c)))

Fixed submission:
from itertools import combinations
n=int(input())
if n == 1:
    print(1)
else:
    xs = []
    for _ in range(n):
        x,y=map(int,input().split())
        xs.append((x,y))
    
    def func(c):
        p,q=(xs[c[0]][0]-xs[c[1]][0],xs[c[0]][1]-xs[c[1]][1])
        ys=[(x,y) for x,y in xs if (x-p,y-q) not in xs]
        return len(ys)
    
    c = combinations(range(n),2)
    print(min(map(func, c)))
Buggy python submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n,m=map(int,input().split())
    if n == 1:
        print(1)
        return
    aa=[]
    for _ in range(m):
        aa.append(int(input()))
    for i in range(m-1):
        if aa[i]+1==aa[i+1]:
            print(0)
            return
    cc = [0] * n
    i = 0
    j = 2 
    cc[0] = 1
    if aa[0] > 1:
        cc[1] = 1
    else:
        cc[1] = 0
        i += 1
    while j < n:
        if i < m and aa[i] == j:
            i+=1
        else:
            cc[j]=cc[j-1]+cc[j-2]
        j+=1
    print((cc[n-1]+cc[n-2])%1000000007)

main()

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n,m=map(int,input().split())
    if n == 1:
        print(1)
        return
    aa=[]
    for _ in range(m):
        aa.append(int(input()))
    for i in range(m-1):
        if aa[i]+1==aa[i+1]:
            print(0)
            return
    cc = [0] * n
    i = 0
    j = 2 
    cc[0] = 1
    if m < 1 or aa[0] > 1:
        cc[1] = 1
    else:
        cc[1] = 0
        i += 1
    while j < n:
        if i < m and aa[i] == j:
            i+=1
        else:
            cc[j]=cc[j-1]+cc[j-2]
        j+=1
    print((cc[n-1]+cc[n-2])%1000000007)

main()
Buggy python submission (verdict: Time Limit Exceeded):
rn,gn,bn,n=map(int,input().split())
nn=sorted([rn,gn,bn]) 
print(sum(n-nn[0]*r-nn[1]*g >=0 and (n-nn[0]*r-nn[1]*g)%nn[2]==0 for r in range(1+n//nn[0]) for g in range(1+n//nn[1])))

Fixed submission:
rn,gn,bn,n=map(int,input().split())
nn=sorted([rn,gn,bn]) 
c=0
for r in range(1+n//nn[0]):
    rt=n-nn[0]*r
    for g in range(1+rt//nn[1]):
        gt=rt-nn[1]*g
        if gt%nn[2]==0:
            c+=1
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
rn,gn,bn,n=map(int,input().split())
print(sum(n-rn*r-gn*g >=0 and (n-rn*r-gn*g)%bn==0 for r in range(1+n//rn) for g in range(1+n//gn))) 

Fixed submission:
rn,gn,bn,n=map(int,input().split())
nn=sorted([rn,gn,bn]) 
c=0
for r in range(1+n//nn[0]):
    rt=n-nn[0]*r
    for g in range(1+rt//nn[1]):
        gt=rt-nn[1]*g
        if gt%nn[2]==0:
            c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
from math import sqrt
n=int(input())
s=0
for i in range(int(sqrt(n))):
    d,m=divmod(n,i+1)
    if m == 0:
        if len(set(divmod(n,d-1))) == 1:
            s += d-1
print(s)

Fixed submission:
from math import sqrt
n=int(input())
s=0
for i in range(int(sqrt(n))):
    d,m=divmod(n,i+1)
    if m == 0:
        if d>1 and len(set(divmod(n,d-1))) == 1:
            s += d-1
print(s)
Buggy python submission (verdict: Runtime Error):
input()
s = input()
k = int(input())
print(''.join(c if c == s[k] else '*' for c in s))

Fixed submission:
input()
s = input()
k = int(input())
print(''.join(c if c == s[k-1] else '*' for c in s))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
print(min(sum(s[j] == '#' if j < i else s[j] == '.' for j in range(n)) for i in range(n+1)))

Fixed submission:
n = int(input())
s = input()
m = s.count('.')
c = (0, m)
for i in range(n):
    if s[i] == '#':
        c = (c[0]+1, c[1])
    else:
        c = (c[0], max(c[1]-1, 0))
    m = min(c[0] + c[1], m)
print(m)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
print(min(s[:i].count('#') + s[i:].count('.') for i in range(n+1)))

Fixed submission:
n = int(input())
s = input()
m = s.count('.')
c = (0, m)
for i in range(n):
    if s[i] == '#':
        c = (c[0]+1, c[1])
    else:
        c = (c[0], max(c[1]-1, 0))
    m = min(c[0] + c[1], m)
print(m)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
ts = ['.' * i + '#' * (n - i) for i in range(n+1)]
print(min(sum(s[i] != t[i] for i in range(n)) for t in ts))

Fixed submission:
n = int(input())
s = input()
m = s.count('.')
c = (0, m)
for i in range(n):
    if s[i] == '#':
        c = (c[0]+1, c[1])
    else:
        c = (c[0], max(c[1]-1, 0))
    m = min(c[0] + c[1], m)
print(m)
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
print(sum(max(x[:i] <= x[i] for i in range(n))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
print(sum(max([0] + a[:i]) <= a[i] for i in range(n)))
Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
i=0
bb=[]
while True:
    b=s.find('AC', i)
    if b<0:
        break
    bb.append(b)
    i=b+1
for _ in range(q):
    l,r=map(int,input().split())
    print(sum(1 for b in bb if l-1<=b<=r-2))

Fixed submission:
n,q=map(int,input().split())
s=input()
i=0
bb=[]
c=0
while True:
    b=s.find('AC', i)
    if b<0:
        bb.extend([c]*(len(s)-i))
        break
    bb.extend([c]*(b-i+1))
    i=b+1
    c+=1
for _ in range(q):
    l,r=map(int,input().split())
    print(bb[r-1]-bb[l-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
for _ 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()
i=0
bb=[]
c=0
while True:
    b=s.find('AC', i)
    if b<0:
        bb.extend([c]*(len(s)-i))
        break
    bb.extend([c]*(b-i+1))
    i=b+1
    c+=1
for _ in range(q):
    l,r=map(int,input().split())
    print(bb[r-1]-bb[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    s=s0=input()
    while True:
        i=s.find('01')
        if i>=0:
            s=s[:i]+s[i+2:]
            continue
        i=s.find('10')
        if i>=0:
            s=s[:i]+s[i+2:]
            continue
        break
    print(len(s0)-len(s))

main()

Fixed submission:
def main():
    s=input()
    print(2*min(s.count('1'),s.count('0')))

main()
Buggy python submission (verdict: Runtime Error):
a,b,c=sorted(input().split())
print(eval(f"{c}{b}+{a}"))

Fixed submission:
a,b,c=sorted(input().split())
print(eval("{}{}+{}".format(c,b,a)))
Buggy python submission (verdict: Runtime Error):
from functools import reduce
from math import gcd
input()
aa=list(map(int,input().split()))
lcm=reduce((lambda a,b:a*b//gcd(a,b)),aa)
m=lcm-1
print(sum(m%a for a in aa))

Fixed submission:
from functools import reduce
from fractions import gcd
input()
aa=list(map(int,input().split()))
lcm=reduce((lambda a,b:a*b//gcd(a,b)),aa)
m=lcm-1
print(sum(m%a for a in aa))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=list(map(int,input().split()))
m=n-1
while m>=0:
    if (m==0 and aa.count(m)!=1) or (m>0 and aa.count(m)!=2):
        print(0)
        sys.exit()
    m-=2
print(2**(n//2))

Fixed submission:
import sys
def input(): return sys.stdin.readline().strip()
n=int(input())
aa=sorted(map(int,input().split()),reverse=True)
m=n-1
for i in range(n//2):
    if aa[2*i]!=m or aa[2*i+1]!=m:
        print(0)
        sys.exit()
    m-=2
print((2**(n//2))%(10**9+7))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())

print(b/c-(a-1)/c)

Fixed submission:
a,b,c=map(int,input().split())
print(b//c-(a-1)//c)
Buggy python submission (verdict: Runtime Error):
a=input()
print(a[1])

Fixed submission:
a,b=open(0);print("YNeos"[a[:-1]!=b[:-2]::2])

Buggy python submission (verdict: Runtime Error):
print("YNeos"[input()[1]=='n'::2])

Fixed submission:
a,b=open(0);print("YNeos"[a[:-1]!=b[:-2]::2])

Buggy python submission (verdict: Runtime Error):
print("YNeos"[input()[0]=='s'||'k'::2])

Fixed submission:
a,b=open(0);print("YNeos"[a[:-1]!=b[:-2]::2])
Buggy python submission (verdict: Runtime Error):
i=input();print(i**3)

Fixed submission:
print(int(input())**3)
Buggy python submission (verdict: Runtime Error):
list(a,b,c)=map(int,input().split())

print(max(c - (a-b), 0))

Fixed submission:
l=list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]


print(max(c - (a-b), 0))

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

print(max(c - (a-b), 0))

Fixed submission:
l=list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]


print(max(c - (a-b), 0))

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()

print(max(c - (a-b), 0))

Fixed submission:
l=list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]


print(max(c - (a-b), 0))
Buggy python submission (verdict: Runtime Error):
n=input()
if n == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))


Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))

Buggy python submission (verdict: Runtime Error):
n=input()
if n==1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(a+b)


Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))

Buggy python submission (verdict: Runtime Error):
n=input()
if (n==1):
  print("Hello World")
else:
  a=input()
  b=input()
  print(a+b)


Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))

Buggy python submission (verdict: Runtime Error):
n=input()
if (n==1):
  print("Hello world")
else:
  a=input()
  b=input()
  print(a+b)

Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))

Buggy python submission (verdict: Runtime Error):
n=input()
if (n==1):
　print("Hello world")
else:
　a=input()
　b=input()
　print(a+b)

Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))

Buggy python submission (verdict: Runtime Error):
n=input()
if (n==1):
print("Hello world")
else:
a=input()
b=input()
print(a+b)

Fixed submission:
n=input()
if int(n) == 1:
  print("Hello World")
else:
  a=input()
  b=input()
  print(int(a)+int(b))