ZhenlongDai/ACPR huggingface dataset:
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n= int(input())

v= list(map(int, input().split())) 
v.append(0)
c= list(map(int, input().split()))
c.append(0)
r=[]

for i in range(n+1):
  r.append(v[i]-c[i]) 

r.sort(reverse=True)

ret= r[0]+r[1]

if ret>0:
  print(ret)
else:
  print(0)

Failing test case input:
4
0 53 1 0
6 2 -2 -2

Expected output:
56


Actual output:
54


Fixed submission (verdict: Accepted):
n= int(input())

v= list(map(int, input().split())) 
c= list(map(int, input().split()))
r=[]

for i in range(n):
  r.append(v[i]-c[i]) 

r.append(0)
r.sort(reverse=True)

ret= sum([j for j in r if j>=0])
print(ret)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()
V = input().split(" ")
C = input().split(" ")

n = int(n)
V_tmp = []
for v in V:
    V_tmp.append(int(v))
V = V_tmp
C_tmp = []
for c in C:
    C_tmp.append(int(v))
C = C_tmp
SA = []
for i in range(n):
    SA.append(C[i]-V[i])
max_ = 0
for i in range(n):
    if SA[i] >= 0:
        max_ += SA[i]
print(max_)

Failing test case input:
4
0 -2 0 178
0 2 2 2

Expected output:
176


Actual output:
536


Fixed submission (verdict: Accepted):
n = input()
V = input().split(" ")
C = input().split(" ")

n = int(n)
V_tmp = []
for v in V:
    V_tmp.append(int(v))
V = V_tmp
C_tmp = []
for c in C:
    C_tmp.append(int(c))
C = C_tmp
SA = []
for i in range(n):
    SA.append(V[i]-C[i])
max_ = 0
for i in range(n):
    if SA[i] >= 0:
        max_ += SA[i]
print(max_)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
d=[]
max=0
num=0
for i in range(n):
            d.append(v[i]-c[i])

for i in range(n-1):
    num+=d[i]
    for k in range(n-i-1):
        if(num+d[i+1+k]>max):
            max=num+d[i+1+k]

print(max)


Failing test case input:
4
13 21 11 26
-1 30 6 10

Expected output:
35


Actual output:
30


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
d=[]
max=0
num=0
for i in range(n):
            d.append(v[i]-c[i])

d.sort()
d.reverse()
for i in range(n):
    num=max+d[i]
    if num>max:
        max=num

print(max)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
vs = list(map(int, input().split()))
cs = list(map(int, input().split()))
ans = 0
for i in range(len(vs)):
  if vs >= cs:
    ans += (vs[i]-cs[i])
print(ans)

Failing test case input:
3
1 8 5
7 3 1

Expected output:
9


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
vs = list(map(int, input().split()))
cs = list(map(int, input().split()))
ans = 0
for i in range(len(vs)):
  if vs[i] >= cs[i]:
    ans += (vs[i]-cs[i])
print(ans)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

V = list(map(int, input().split()))

C = list(map(int, input().split()))

P = 0

for i in range(N):
  Y = V[i] - C[i]
  if Y > P:
    P = Y
print(P)


Failing test case input:
3
2 8 2
1 3 1

Expected output:
7


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())

V = list(map(int, input().split()))

C = list(map(int, input().split()))

P = 0

for i in range(N):
  Y = V[i] - C[i]
  if Y >0:
    P += Y
print(P)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
ans=0
diff=[0]*n
for i in range(n):
    diff[i]=v[i]-c[i]
for i in range(n):
    if diff[i]>=0:
        ans+=1
print(ans)

Failing test case input:
1
101
3

Expected output:
98


Actual output:
1


Fixed submission (verdict: Accepted):
n=int(input())
v=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
ans=0
diff=[0]*n
for i in range(n):
    diff[i]=v[i]-c[i]
for i in range(n):
    if diff[i]>=0:
        ans+=diff[i]
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())

v = input().split()
c = input().split()
sum=0

print(v,c)
for i in range(0,n):
    s = int(v[i])-int(c[i]) 
    print(s)
    if s >=0:
        sum += s
print(sum)

Failing test case input:
4
0 -2 0 178
0 2 2 2

Expected output:
176


Actual output:
['0', '-2', '0', '178'] ['0', '2', '2', '2']
0
-4
-2
176
176


Fixed submission (verdict: Accepted):

n = int(input())

v = input().split()
c = input().split()
sum=0

for i in range(0,n):
    s = int(v[i])-int(c[i]) 
    if s >=0:
        sum += s
print(sum)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

profits = []
z = 0

for i in range(n):
    profits.append(v[i] - c[i])
profits.sort()



for i in profits:
    p = profits.pop()
    if p <= 0:
        print(z)
        exit()
    else:
        z += p
print(z)

Failing test case input:
4
13 21 11 26
-1 30 6 10

Expected output:
35


Actual output:
30


Fixed submission (verdict: Accepted):


n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

profits = []
z = 0

for i in range(n):
    profits.append(v[i] - c[i])
profits.sort()


for i in range(n):
    p = profits.pop()
    
    if p <= 0:
        print(z)
        exit()
    else:
        z += p
print(z)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input("個数を入力してください----"))
V = list(map(int, input("価値を入力してください").split()))
C = list(map(int, input("コストを入力してください").split()))

worth = 0

for i in range(N):
    if V[i] > C[i]:
        worth += V[i] - C[i]
    else:
        pass

print(worth)

Failing test case input:
4
28 0 -5 2
0 0 -8 -1

Expected output:
34


Actual output:
個数を入力してください----価値を入力してくださいコストを入力してください34


Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

worth = 0

for i in range(N):
    if V[i] > C[i]:
        worth += V[i] - C[i]
    else:
        pass

print(worth)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):























n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
    if v[i] - c[i] > 0:
        ans += v[i] + c[i]

print(ans)

Failing test case input:
4
13 21 11 26
-1 19 11 10

Expected output:
32


Actual output:
88


Fixed submission (verdict: Accepted):
















n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
    if v[i] - c[i] > 0:
        ans += v[i] - c[i]

print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

V = list(map(int, input().split()))

C = list(map(int, input().split()))

P = 0

for i in range(N):
  Y = V[i] - C[i]
  if Y >0:
    P += Y
print(Y)

Failing test case input:
4
2 -1 0 69
0 2 8 0

Expected output:
71


Actual output:
69


Fixed submission (verdict: Accepted):
N = int(input())

V = list(map(int, input().split()))

C = list(map(int, input().split()))

P = 0

for i in range(N):
  Y = V[i] - C[i]
  if Y >0:
    P += Y
print(P)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
V=[]
C=[]
dif=[]
sum=0
V=list(input().split())
C=list(input().split())
for i in range(N):
    dif.append(int(V[i])-int(C[i]))
print(dif)
for i in range(N):
    if dif[i]>=0:
        sum+=dif[i]
print(sum)


Failing test case input:
4
2 2 0 167
6 1 0 1

Expected output:
167


Actual output:
[-4, 1, 0, 166]
167


Fixed submission (verdict: Accepted):
N=int(input())
V=[]
C=[]
dif=[]
sum=0
V=list(input().split())
C=list(input().split())
for i in range(N):
    dif.append(int(V[i])-int(C[i]))
for i in range(N):
    if dif[i]>=0:
        sum+=dif[i]
print(sum)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
C = list(map(int, input().split()))
V = list(map(int, input().split()))
sum = 0
for i in range(N):
  if V[i] > C[i]:
    sum += V[i] - C[i]
print(sum)

Failing test case input:
4
0 1 0 50
0 2 6 2

Expected output:
48


Actual output:
7


Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
sum = 0
for i in range(N):
    sum += max(0, V[i]-C[i])
print(sum)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans1=0
ans2=0
for i in range (len(v)):
    if v[i]>c[i]:
        ans1 += v[i]-c[i]
    else:
        ans2 += c[i]-v[i]
print(max(ans1,ans2))

Failing test case input:
1
1
45

Expected output:
0


Actual output:
44


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans1=0
ans2=0
for i in range (len(v)):
    if v[i]>c[i]:
        ans1 += v[i]-c[i]
print(ans1)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=[int(x) for x in input().split()]
c=[int(y) for y in input().split()]

new=[v[i]-c[i] for i in range(n)]
new.sort()
if len(new)>=2:
    print(new[-2]+new[-1])
else:
    print(max(new[0],0))


Failing test case input:
4
6 2 11 13
-1 1 10 4

Expected output:
18


Actual output:
16


Fixed submission (verdict: Accepted):
n=int(input())
v=[int(x) for x in input().split()]
c=[int(y) for y in input().split()]

new=[v[i]-c[i] for i in range(n) if v[i]-c[i]>0]

print(sum(new))

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
X = [V - C for (V, C) in zip(V, C)]
i = 0
for i in X:
    if i < 0:
        X.remove(i)

print(sum(X))

Failing test case input:
4
0 1 0 50
0 2 6 0

Expected output:
50


Actual output:
44


Fixed submission (verdict: Accepted):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
X = [V - C for (V, C) in zip(V, C)]
i = 0
a = 0
for i in X:
    if i > 0:
        a += i
print(a)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans1=0
ans2=0
for i in range (len(v)):
    if v[i]>c[i]:
        ans1 += v[i]-c[i]
    else:
        ans2 += c[i]-v[i]
print(min(ans1,ans2))

Failing test case input:
4
1 1 0 50
0 2 6 2

Expected output:
49


Actual output:
7


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans1=0
ans2=0
for i in range (len(v)):
    if v[i]>c[i]:
        ans1 += v[i]-c[i]
print(ans1)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
print(sum([i for i in range(n) if v[i] > c[i]]))

Failing test case input:
4
0 -1 0 88
0 2 3 0

Expected output:
88


Actual output:
3


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
print(sum([v[i] - c[i] for i in range(n) if v[i] > c[i]]))
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
d=0
for i in range(n):
  tmp=v[i]-c[i]
  if tmp>0:
    d+=tmp
print(tmp)

Failing test case input:
4
13 21 6 19
0 30 6 10

Expected output:
22


Actual output:
9


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
d=0
for i in range(n):
  tmp=v[i]-c[i]
  if tmp>0:
    d+=tmp
print(d)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
print(v,c)
result = 0
for i in range(n):
  if v[i] > c[i]:
    result += v[i] - c[i]
print(result)

Failing test case input:
4
13 21 6 19
11 30 6 10

Expected output:
11


Actual output:
[13, 21, 6, 19] [11, 30, 6, 10]
11


Fixed submission (verdict: Accepted):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
result = 0
for i in range(n):
  if v[i] > c[i]:
    result += v[i] - c[i]
print(result)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

V = list(map(int,input().split()))
C = list(map(int,input().split()))

a = 0
for i in range(N):
    if C[i] >= V[i]:
        a += C[i]-V[i]

print(a)

Failing test case input:
4
2 1 -1 167
6 1 0 3

Expected output:
164


Actual output:
5


Fixed submission (verdict: Accepted):
N = int(input())

V = list(map(int,input().split()))
C = list(map(int,input().split()))

a = 0
for i in range(N):
    if V[i] > C[i]:
        a += V[i]-C[i]

print(a)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
input = sys.stdin.readline

n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = []
for i in range(n):
    ans.append(v[i]-c[i])
ans.sort()
print(sum(ans)-ans[0])

Failing test case input:
1
111
-13

Expected output:
124


Actual output:
0


Fixed submission (verdict: Accepted):

import sys
input = sys.stdin.readline

n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = [0]
for i in range(n):
    if v[i]-c[i] >0:
        ans.append(v[i]-c[i])
print(sum(ans))

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
x = []

for i in range(n):
    if v[i] - c[i] <= 0:
        x.append(v[i]-c[i])
print(sum(x))


Failing test case input:
4
0 88 1 1
0 2 -3 2

Expected output:
90


Actual output:
-1


Fixed submission (verdict: Accepted):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
x = []

for i in range(n):
    if v[i] - c[i] >= 0:
        x.append(v[i]-c[i])
print(sum(x))
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

ans = 0

for i in range(n):
  if v[i] - c[i]:
    ans += v[i] - c[i]
print(ans) 

Failing test case input:
4
13 21 11 26
-1 30 11 10

Expected output:
30


Actual output:
21


Fixed submission (verdict: Accepted):
n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

ans = 0

for i in range(n):
  if v[i] - c[i] > 0:
    ans += v[i] - c[i]
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = map(int, input().split())
c = map(int, input().split())
ans = 0
for i, j in zip(v, c):
  if i - j > 0:
    ans = i - j
print(ans)


Failing test case input:
4
2 2 0 13
0 1 3 3

Expected output:
13


Actual output:
10


Fixed submission (verdict: Accepted):
n = int(input())
v = map(int, input().split())
c = map(int, input().split())
ans = 0
for i, j in zip(v, c):
  if i - j > 0:
    ans += i - j
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input();
Values = list(map(int, input().split()))
Costs = list(map(int, input().split()))
total = 0
for (value, cost) in zip(Values, Costs):
  if value > cost:
    total = value - cost

print(total)

Failing test case input:
4
0 88 1 1
0 2 -3 2

Expected output:
90


Actual output:
4


Fixed submission (verdict: Accepted):
input()
Values = list(map(int, input().split()))
Costs = list(map(int, input().split()))
total = 0
for (value, cost) in zip(Values, Costs):
    if value > cost:
        total += value - cost
    
print(total)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
Vlist=list(map(int, input().split()))
Clist=list(map(int, input().split()))
print(Vlist)
ret=0

for i in range(N):
    if Vlist[i]-Clist[i] > 0:
        ret += Vlist[i]-Clist[i]
print(ret)

Failing test case input:
1
100
-2

Expected output:
102


Actual output:
[100]
102


Fixed submission (verdict: Accepted):
N=int(input())
Vlist=list(map(int, input().split()))
Clist=list(map(int, input().split()))

ret=0

for i in range(N):
    if Vlist[i]-Clist[i] > 0:
        ret += Vlist[i]-Clist[i]
print(ret)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
d = 0
for i in range(n):
    if v[i] < c[i]:
        d = d + v[i] - c[i]
print(d)

Failing test case input:
4
6 2 19 13
-1 1 3 4

Expected output:
33


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
d = 0
for i in range(n):
    if v[i] > c[i]:
        d = d + v[i] - c[i]
print(d)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
  for j in range(i+1, n):
    x = v[i] + v[j]
    y = c[i] + c[j]
    if x-y > ans:
      ans = x-y
print(ans)


Failing test case input:
4
6 2 19 13
-1 1 3 4

Expected output:
33


Actual output:
25


Fixed submission (verdict: Accepted):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

x, y = 0, 0
for i in range(n):
  if v[i] - c[i] > 0:
    x += v[i]
    y += c[i]
print(x-y)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n= int(input())

v= list(map(int, input().split())) 
c= list(map(int, input().split()))
r=[]

for i in range(n):
  r.append(v[i]-c[i]) 

r.sort(reverse=True)
r.append(0)
ret= r[0]+r[1]

if ret>0:
  print(ret)
else:
  print(0)

Failing test case input:
4
-1 22 1 1
2 8 -13 -2

Expected output:
31


Actual output:
28


Fixed submission (verdict: Accepted):
n= int(input())

v= list(map(int, input().split())) 
c= list(map(int, input().split()))
r=[]

for i in range(n):
  r.append(v[i]-c[i]) 

r.append(0)
r.sort(reverse=True)

ret= sum([j for j in r if j>=0])
print(ret)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = input()
n = int(n)

total = 0

lst_a = input().split()
lst_b = input().split()

for i in range(0, n ,1):
    a = lst_a[0]
    b = lst_b[0]
    a = int(a)
    b = int(b)
    if a > b:
        total += (a - b)

print(total)

Failing test case input:
4
0 -1 0 115
1 2 3 1

Expected output:
114


Actual output:
0


Fixed submission (verdict: Accepted):

n = input()
n = int(n)

total = 0

lst_a = input().split()
lst_b = input().split()

for i in range(0, n ,1):
    a = lst_a[i]
    b = lst_b[i]
    a = int(a)
    b = int(b)
    if a > b:
        total += (a - b)

print(total)

Problem: p03060
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

ans = 0
for v, c in zip(V, C):
    ans += min(v - c, 0)

print(ans)

Failing test case input:
4
3 2 11 26
-1 15 16 10

Expected output:
20


Actual output:
-18


Fixed submission (verdict: Accepted):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

ans = 0
for v, c in zip(V, C):
    ans += max(v - c, 0)

print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
List = []
for i in range(N):
    List.append(V[i]-C[i])
List.sort()
for i in List:
    if i > 0:
        print(sum(List[i:]))
        exit()
print('0')

Failing test case input:
3
10 2 5
12 5 4

Expected output:
1


Actual output:
-1


Fixed submission (verdict: Accepted):


N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
List = []
for i in range(N):
    List.append(V[i]-C[i])
List.sort(reverse=True)
total = 0
for i in List:
    if i > 0:
        total += i
print(total)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
vc=[(v[i],c[i]) for i in range(n)]
vc=sorted(vc,key=lambda x:(x[0],x[1]))[::-1]
x=0
y=0
ans=[]
for i in range(n):
    x+=vc[i][0]
    y+=vc[i][1]
    ans.append(x-y)
print(max(ans))

Failing test case input:
4
1 1 0 50
0 2 6 2

Expected output:
49


Actual output:
48


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
vc=[(v[i],c[i]) for i in range(n)]
vc=sorted(vc,key=lambda x:(x[0],x[1]))[::-1]
x=0
y=0
ans=0
for i in range(n):
    temp_x = x+vc[i][0]
    temp_y = y+vc[i][1]
    if ans<temp_x-temp_y:
        ans=temp_x-temp_y
        x+=vc[i][0]
        y+=vc[i][1]
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

X = 0
Y = 0

for i in range(N):
    if V[i] > C[i]:
        X = V[i]
        Y = V[i]
        X += X
        Y += Y

if (X-Y) > 0:
    print(X-Y)

Failing test case input:
4
0 -1 0 133
-1 2 1 1

Expected output:
133


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

X = 0
Y = 0

for i in range(N):
    if V[i] > C[i]:
        v = V[i]
        c = C[i]
        X = X + v
        Y = Y + c

print(X-Y)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
V=[int(x) for x in input().split()]
C=[int(x) for x in input().split()]

Y=0
for x in [0,N-1]:
    Y+=max(0,V[x]-C[x])

print(Y)

Failing test case input:
4
2 2 2 328
6 1 3 2

Expected output:
327


Actual output:
326


Fixed submission (verdict: Accepted):
N=int(input())
V=[int(x) for x in input().split()]
C=[int(x) for x in input().split()]

Y=0
for x in range(N):
    Y+=max(0,V[x]-C[x])
print(Y)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = input().split()
C = input().split()
cost = []
x = 0
for i in range(N):
    cost.append(int(V[int(i)]) - int(C[int(i)]))
print(cost)
print(sorted(cost,reverse=True))
for i in range(N):
    if cost[i] > 0:
        x = x + int(cost[i])
print(x)

Failing test case input:
3
10 1 5
12 5 1

Expected output:
4


Actual output:
[-2, -4, 4]
[4, -2, -4]
4


Fixed submission (verdict: Accepted):
N = int(input())
V = input().split()
C = input().split()
cost = []
x = 0
for i in range(N):
    cost.append(int(V[int(i)]) - int(C[int(i)]))
for i in range(N):
    if cost[i] > 0:
        x = x + int(cost[i])
print(x)
Problem: p03060
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
list = [0]
x, y = 0, 0

v_sort = sorted(v,reverse = True)
c_sort = sorted(c,reverse = True)

for i in range(len(v_sort)):
    if v_sort[i] > c_sort[i]:
        x += int(v_sort[i])
        y += int(c_sort[i])
        list.append(x - y)
    else:
        continue

print(max(list))


Failing test case input:
4
2 2 2 114
8 1 3 2

Expected output:
113


Actual output:
107


Fixed submission (verdict: Accepted):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
list = [0]
x, y = 0, 0

v_sort = sorted(v,reverse = True)
c_sort = sorted(c,reverse = True)

for i in range(len(v)):
    if v[i] > c[i]:
        x += int(v[i])
        y += int(c[i])
        list.append(x - y)
    else:
        continue

print(max(list))

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
v = list(map(int, input().strip().split(' ')))
c = list(map(int, input().strip().split(' ')))
l = [0] * n
for i in range(n):
  l[i]=v[i]-c[i]
l.sort(reverse=True)
print(sum(l[0:n-1]))

Failing test case input:
1
56
2

Expected output:
54


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
v = list(map(int, input().strip().split(' ')))
c = list(map(int, input().strip().split(' ')))
l = [0] * n
for i in range(n):
  l[i]=v[i]-c[i]
l.sort(reverse=True)
s = 0
for i in range(n):
  if s < sum(l[0:i+1]):
    s = sum(l[0:i+1])
print(s)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
c = []
A = 0
for i in range (N):
    V[i] - C[i] > 0
    c.append(i)
for j in c:
    A += V[j] + C[j]
print(A)

Failing test case input:
4
13 21 6 19
11 30 6 15

Expected output:
6

Actual output:
121


Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
c = []
A = 0
for i in range (N):
    if V[i] - C[i] > 0:
        c.append(i)
for j in c:
    A += V[j] - C[j]
print(A)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
cnt=0
for i in range(N):
	if V[i]-C[i] > 0:
		cnt = cnt + 1
print(cnt)

Failing test case input:
4
0 -1 0 187
1 2 3 1

Expected output:
186


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
X=0
for i in range(N):
	if V[i]-C[i] > 0:
		X = X + V[i]-C[i]
print(X)
Problem: p03060
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
ret = 0
for state in range((1 << n) - 1):
    values = costs = 0
    for shift in range(n):
        if (state >> shift) & 1 == 1:
            values += value[shift]
            costs += cost[shift]
    ret = max(ret, values - costs)
print(ret)

Failing test case input:
1
100
-2

Expected output:
102


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
ret = 0
for state in range((1 << n)):
    values = costs = 0
    for shift in range(n):
        if (state >> shift) & 1 == 1:
            values += value[shift]
            costs += cost[shift]
    ret = max(ret, values - costs)
print(ret)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = 0
V = []
C = []
 
i = 0
ans = 0

str = input()
N = int(str)
 
str = input().split()
while i < N:
  V.append(int(str[i]))
  i = i+1
  
i=0
str = 0
str = input().split()
while i < N:
  C.append(int(str[i]))
  i = i+1
 
while i<N:
  if V[i] > C[i]:
    ans = ans + V[i] - C[i]
    
    
print(ans)

Failing test case input:
4
6 2 19 13
-1 1 3 4

Expected output:
33


Actual output:
0


Fixed submission (verdict: Accepted):
N = 0
V = []
C = []
 
i = 0
ans = 0

str = input()
N = int(str)
 
str = input().split()
while i < N:
  V.append(int(str[i]))
  i = i+1
  
i=0
str = 0
str = input().split()
while i < N:
  C.append(int(str[i]))
  i = i+1

i=0
while i<N:
  if V[i] > C[i]:
    ans = ans + V[i] - C[i]
  i = i+1
    
    
print(ans)

Problem: p03060
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
icase=0
if icase==0:
    n=int(input())
    v=list(map(int,input().split()))
    c=list(map(int,input().split()))
    tmax=0
    for i in range(2 ** n):
        total = 0
        for j in range(n):  
            if ((i >> j) & 1):  
                total = total+v[j]-c[j]   
    print(tmax)

Failing test case input:
1
100
0

Expected output:
100


Actual output:
0


Fixed submission (verdict: Accepted):
icase=0
if icase==0:
    n=int(input())
    v=list(map(int,input().split()))
    c=list(map(int,input().split()))
    tmax=0
    for i in range(n):
        total = 0
        for j in range(n):
            total = total+max(0,v[j]-c[j])   
        tmax=max(tmax,total)
    print(tmax)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
H = list(map(int, input().split()))
count = 0
M = 0
for i in range(N):
  print(H[i])
  if H[i]>=M:
    count += 1
    M = H[i]
print(count)

Failing test case input:
4
18 1 -11 2
2 2 -3 -1

Expected output:
19


Actual output:
18
1
-11
2
1


Fixed submission (verdict: Accepted):
N = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
ans = 0
for i in range(N):
  if X[i]-Y[i]>0:
    ans += X[i]-Y[i]
print(ans)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
t = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
a = sum(v)
b = sum(c)
mxx = abs(a-b)
for i in range(t):
    temp = abs(a-b)
    a1 = a - v[i]
    b1 = b - c[i]
    if(abs(a1-b1)>temp):
        a = a1
        b = b1
        mxx = abs(a-b)
        
print(mxx)  


Failing test case input:
4
6 2 11 13
-1 4 16 10

Expected output:
10


Actual output:
7


Fixed submission (verdict: Accepted):
t = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
a = sum(v)
b = sum(c)
mxx = a-b
for i in range(t):
    temp = a-b
    a1 = a - v[i]
    b1 = b - c[i]
    if((a1-b1)>temp):
        a = a1
        b = b1
        mxx = a-b
        
print(mxx)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans1=0
ans2=0
for i in range(n):
  if v[i]-c[i] > 0:
    ans1+=v[i]-c[i]
  else:
    ans2+=abs(v[i]-c[i])
print(max(ans1,ans2))


Failing test case input:
1
1
45

Expected output:
0


Actual output:
44


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=0
for i in range(n):
  if v[i]-c[i] > 0:
    ans+=v[i]-c[i]
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

profits = []
z = 0

for i in range(n):
    profits.append(v[i] - c[i])
profits.sort()

print(profits)

for i in profits:
    p = profits.pop()
    if p < 0:
        print(z)
        exit()
    else:
        z += p
print(z)

Failing test case input:
4
13 21 11 26
-1 30 11 10

Expected output:
30


Actual output:
[-9, 0, 14, 16]
30


Fixed submission (verdict: Accepted):


n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

profits = []
z = 0

for i in range(n):
    profits.append(v[i] - c[i])
profits.sort()


for i in range(n):
    p = profits.pop()
    
    if p <= 0:
        print(z)
        exit()
    else:
        z += p
print(z)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = list(map(int, input().split())) 
C = list(map(int, input().split())) 

X = 0
Y = 0

for i in range(N):
    if V[i] < C[i]:
        X = V[i]
        Y = V[i]
        X += X 
        Y += Y

if (X-Y) > 0:
    print(X-Y)

Failing test case input:
4
0 -2 0 180
0 2 2 2

Expected output:
178


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

X = 0
Y = 0

for i in range(N):
    if V[i] > C[i]:
        v = V[i]
        c = C[i]
        X = X + v
        Y = Y + c

print(X-Y)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

X = 0
Y = 0

for i in range(N):
    if V[i] > C[i]:
        print(i)
        v = V[i]
        c = C[i]
        X = X + v
        Y = Y + c
        print(X-Y)

Failing test case input:
3
1 34 1
6 0 -3

Expected output:
38


Actual output:
1
34
2
38


Fixed submission (verdict: Accepted):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

X = 0
Y = 0

for i in range(N):
    if V[i] > C[i]:
        v = V[i]
        c = C[i]
        X = X + v
        Y = Y + c

print(X-Y)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
b = input()
v = []
v.append(b.split())
v = v[0]
count = 0
for v1 in v:
    v.remove(v1)
    v.insert(count, int(v1))
s = input()
c = []
c.append(s.split())
c = c[0]
count = 0
for c1 in c:
    c.remove(c1)
    c.insert(count, int(c1))
print(v)
print(c)
a = []
for (v1,c1) in zip(v,c):
    add = v1 - c1
    a.append(add)
ans = 0
for a1 in a:
    if a1 >= 0:
        ans += a1
print(ans)

Failing test case input:
4
-2 90 1 1
2 2 -2 -1

Expected output:
93


Actual output:
[1, 1, 90, -2]
[-1, -2, 2, 2]
93


Fixed submission (verdict: Accepted):
n = int(input())
b = input()
v = []
v.append(b.split())
v = v[0]
count = 0
for v1 in v:
    v.remove(v1)
    v.insert(count, int(v1))
s = input()
c = []
c.append(s.split())
c = c[0]
count = 0
for c1 in c:
    c.remove(c1)
    c.insert(count, int(c1))
a = []
for (v1,c1) in zip(v,c):
    add = v1 - c1
    a.append(add)
ans = 0
for a1 in a:
    if a1 >= 0:
        ans += a1
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
for i in range(2**n):
	sum_v=0
	sum_c=0
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append(sum_v-sum_c)
print(max(ans))


Failing test case input:
1
1
50

Expected output:
0

Actual output:
-49


Fixed submission (verdict: Accepted):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
sum_v=0
sum_c=0
for i in range(n):
	if v[i]-c[i]>=0:
		sum_v+=v[i]
		sum_c+=c[i]
		ans.append(sum_v-sum_c)
try:
	print(max(ans))
except ValueError:
	print("0")

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

sum = 0
for i in range(N):
  if V[i] > C[i]:
    sum += V[i]
    
print(sum)

Failing test case input:
4
0 -1 0 133
0 2 1 1

Expected output:
132


Actual output:
133


Fixed submission (verdict: Accepted):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

sum = 0
for i in range(N):
  if V[i] > C[i]:
    sum += V[i] - C[i]
    
print(sum)
Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=[]
ans=0
for i in range(n):
    c.append(a[i]-b[i])

print(c)
for i in c:
    if i>=0:
        ans+=i
print(ans)

Failing test case input:
3
2 18 2
15 2 -3

Expected output:
21


Actual output:
[-13, 16, 5]
21


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=[]
ans=0
for i in range(n):
    c.append(a[i]-b[i])

for i in c:
    if i>=0:
        ans+=i
print(ans)

Problem: p03060
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
x =list(map(int, input().split()))
y =list(map(int, input().split()))
diff = [x[i]-y[i] for i in range(n)]
num = 0
for d in diff:
    if(d > 0):
        num += d

Failing test case input:
4
0 -2 1 180
0 4 0 1

Expected output:
180


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
x =list(map(int, input().split()))
y =list(map(int, input().split()))
diff = [x[i]-y[i] for i in range(n)]
num = 0
for d in diff:
    if(d > 0):
        num += d
print(num)
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
List = list(map(int,input().split()))
A = List[0]
B = List[1]
C = List[2]

C = C - (A - B)

print(C)

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
List = list(map(int,input().split()))
A = List[0]
B = List[1]
C = List[2]

if (C - A + B) >= 0:

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

get = A - B

i = C - get

print(i)


Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


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

get = A - B

i = C - get

if i < 0:
    i = 0
     
print(i)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
print(min(a-b,c))

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
5


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
print(c-min(a-b,c))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
d = c-a+b
print(d)

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
d = c-a+b
if d <0:
    d = 0
print(d)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int, input().split())
print(C-(A-B))

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
A,B,C = map(int, input().split())
print(C-(A-B) if C-(A-B) >=0 else 0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lst = input().split()
a = int(lst[0])
b = int(lst[1])
c = int(lst[2])
print(c-(a-b))

Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


Fixed submission (verdict: Accepted):
lst = input().split()
a = int(lst[0])
b = int(lst[1])
c = int(lst[2])
print(max(0,c-(a-b)))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
print(min(a+c,b))


Failing test case input:
1 54 2

Expected output:
55


Actual output:
3


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
print(max(0, c-(a-b)))

Problem: p02951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())

left = a - b
print(c - left)


Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


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

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(c-(a+b))


Failing test case input:
8 6 16

Expected output:
14


Actual output:
2


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(max(c-a+b,0))
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(-eval(input().replace(' ','-')))


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
a=-eval(input().replace(' ','-'));print((a>0)*a or 0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = list(map(int,input().strip().split()))
s = A - B
a = C - s
print(a)

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
A,B,C = list(map(int,input().strip().split()))
s = A - B
a = C - s
if a >= 0:
    print(a)
elif a < 0:
    print(0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(0 if a>=(b+c) else c-a-b)

Failing test case input:
1 42 0

Expected output:
41


Actual output:
-43


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(0 if a>=(b+c) else c-(a-b))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

if C <= A - B:
    ans = 0
else:
    ans = C - A - B

print(ans)

Failing test case input:
-15 4 6

Expected output:
25


Actual output:
17


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

if C <= A - B:
    ans = 0
else:
    ans = C - A + B

print(ans)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().split() 



A = S[0]
B = S[1]
C = S[2]

cup1_capacity = int(A)
cup1_containing = int(B)
cup2_containing = int(C)



water_moved_from_cup2_to_cup1 = cup1_capacity - cup1_containing
cup2_remaining = cup2_containing - water_moved_from_cup2_to_cup1

print(cup2_remaining)

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


Fixed submission (verdict: Accepted):
S = input().split() 



A = S[0]
B = S[1]
C = S[2]

cup1_capacity = int(A)
cup1_containing = int(B)
cup2_containing = int(C)



water_moved_from_cup2_to_cup1 = cup1_capacity - cup1_containing
cup2_remaining = cup2_containing - water_moved_from_cup2_to_cup1

print(max(cup2_remaining, 0))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
print(min(a, b + c))

Failing test case input:
8 3 9

Expected output:
4

Actual output:
8


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
print(max(c - (a - b), 0))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

a = C - (A - B)

print(a)


Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


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

a = C - (A - B)

if a <= 0:
    print(0)
else:
    print(a)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())

if B+C <= A:
  print(B+C)
else:
  print(A)
    

Failing test case input:
1 62 0

Expected output:
61


Actual output:
1


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

if B+C <= A:
  print(0)
else:
  print(B-(A-C))
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
print(0 if C == (A-B) else C - (A-B))

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
print(C-(A-B) if C-(A-B) > 0 else 0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int,input().split())
ans = (C - (A - B))
if C < 0:
    C = 0
print(ans)

Failing test case input:
9 0 7

Expected output:
0


Actual output:
-2


Fixed submission (verdict: Accepted):
A,B,C = map(int,input().split())
ans = (C - (A - B))
if ans < 0:
    ans = 0
print(ans)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())
print(c-(a-b))

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
print(c-(a-b) if c > a-b else 0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())
print ((b+c)-a)

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
w = (b+c)-a
if w < 1:
    w = 0
print (w)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
ans = b + c - a

if ans <= a:
    print("0")
else:
    print(b+c-a)


Failing test case input:
8 3 9

Expected output:
4

Actual output:
0


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
bc = b + c

if bc > a:
    bc -= a
    print(bc)
else:
    print("0")

Problem: p02951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B, C = map(int, input().split())
print(min(0, B+C-A))


Failing test case input:
0 0 29

Expected output:
29


Actual output:
0


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().split())
print(max(0, B+C-A))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
print(C-(A-B))

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


Fixed submission (verdict: Accepted):
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
if C-(A-B) >= 0:
    print(C-(A-B))
else:
    print(0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = [int(x) for x in input().split()]

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


Failing test case input:
-25 1 5

Expected output:
31


Actual output:
29


Fixed submission (verdict: Accepted):
A, B, C = [int(x) for x in input().split()]

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = map(int, input().split())

if B+C < A:
    print(B+C-A)
else:
    print(0)

Failing test case input:
1 42 0

Expected output:
41


Actual output:
0


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

if A-B < C:
    print(C-(A-B))
else:
    print(0)
Problem: p02951
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c = map(int,input().split())
print(c-(a-b))

Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
print((c-(a-b))*(c-(a-b)>=0))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=map(int,input().split())

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


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


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

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = map(int, input().split())

print(B+C-A)

Failing test case input:
9 0 7

Expected output:
0


Actual output:
-2


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

print(max(B+C-A, 0))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict, deque
import sys

sys.setrecursionlimit(100000)

MIN = -10 ** 9
MAX = 10 ** 9 + 7


def main():
    
    a, b, c = [int(a) for a in input().split()]
    
    
    
    
    

    print(c - a + b)


if __name__ == '__main__':
    main()


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
from collections import defaultdict, deque
import sys

sys.setrecursionlimit(100000)

MIN = -10 ** 9
MAX = 10 ** 9 + 7


def main():
    
    a, b, c = [int(a) for a in input().split()]
    
    
    
    
    

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


if __name__ == '__main__':
    main()

Problem: p02951
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b, c = Input()
    ans = c - (a - b)
    print(ans if c > 1 else 0)


print(main())

Failing test case input:
0 6 16

Expected output:
22


Actual output:
22
None


Fixed submission (verdict: Accepted):
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b, c = Input()
    x = a - b
    use = min(c, x)
    ans = c -use
    print(ans)


main()

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
d = a - b
print(c - d)

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
d = a - b
if(d >= c):
  print(0)
else:
  print(c-d)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c=map(int,input().split())
if b+c<=20:
    print(0)

else:
    print(c-(b-a))

Failing test case input:
1 62 1

Expected output:
62


Actual output:
-60


Fixed submission (verdict: Accepted):

a,b,c=map(int,input().split())
if b+c<=a:
    print(0)

else:
    print(c+b-a)