ZhenlongDai/ACPR huggingface dataset:
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C  = map(int,input().split())
if (A-B)>0:
  print(C-(A-B))
else:
  print(C)

Failing test case input:
-1 6 4

Expected output:
11


Actual output:
4


Fixed submission (verdict: Accepted):
A,B,C  = map(int,input().split())
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 = map(int,input().split())
print(int(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())
x = a-b
r = c-min(x,c)
print(r)

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

Failing test case input:
0 0 29

Expected output:
29


Actual output:
0


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

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(max(0,C-(A-B)))

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

print(C - (A - B))

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


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

ans = C - (A - B)

if ans < 0:
  print(0)
else:
  print(ans)

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

print(c-(a-b))

Failing test case input:
9 0 7

Expected output:
0


Actual output:
-2


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

temp=c-(a-b)
if temp<0:
    temp=0


print(temp)

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(max(0,C-(A-B)))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y,z = map(int,input().split())
print(z-(x-y))

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
x,y,z = map(int,input().split())
print(z-(x-y)) if y+z >= x else print(0)

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

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(max(0,c-(a-b)))
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())

margin = a - b

result = 0

if margin > 0 and c - margin > 0:
  result = c - margin  
  
print(result)

Failing test case input:
2 396 -1

Expected output:
393


Actual output:
0


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

result = c - (a - b) 

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

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:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
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(C - (A - B))

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


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

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:
17 -1 5

Expected output:
0


Actual output:
-13


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

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

Failing test case input:
9 0 7

Expected output:
0


Actual output:
-2


Fixed submission (verdict: Accepted):
A, B, C = map(int, input().strip().split())
ans=C-(A-B)
print(max(0,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 7

Expected output:
0


Actual output:
-2


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

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) 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())
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(max(C - (A - B), 0))

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:
12 3 7

Expected output:
0

Actual output:
-2


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 = list(map(int, input().split()))

print(-(A - B - C))


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


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

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

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

a, b, c = (int(x) for x in input().split())


youki = a - b
nokori = youki-c

if nokori < 0 :
    print(0)

else :
    print(nokori)

Failing test case input:
8 6 16

Expected output:
14


Actual output:
0


Fixed submission (verdict: Accepted):

a, b, c = (int(x) for x in input().split())


mizu = b + c
amari = mizu-a

if amari <= 0 :
    print(0)

else :
    print(amari)

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

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
N = input().split(' ')
A = int(N[0])
B = int(N[1])
C = int(N[2])
x = A -B
result = C - x
if result < 0:
    print(int('0'))
else:
    print(result)

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 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
a, b, c = map(int,input().split())
print(max(0, 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-A)
else:
    print(0)
    

Failing test case input:
8 3 16

Expected output:
11


Actual output:
-5


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

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

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


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

Problem: p02951
Buggy submission (PyPy3 (7.3.0), 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(max(c - (a - b), 0))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C = list(map(int, input().strip().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 = list(map(int, input().strip().split(' ')))
 
print(max(C - (A - B), 0))

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
a, b, c= (int(i) for i in input().split())
ans = max(c+b-a,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(max(C - (A - B), 0))

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

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

Failing test case input:
-11 1 3

Expected output:
15


Actual output:
0


Fixed submission (verdict: Accepted):

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

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:
12 0 7

Expected output:
0


Actual output:
-5


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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

a,b,c = ai()
print(c-a+b)

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]
 
a,b,c = ai()
print(max(0,c-a+b))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputNum = list(map(int, input().split()))

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

print(C - (A - B))


Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
inputNum = list(map(int, input().split()))

A = inputNum[0]
B = inputNum[1]
C = inputNum[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 = map(int,input().split())
if a>b+c:
  print(0)
print(c-a+b)

Failing test case input:
12 0 4

Expected output:
0


Actual output:
0
-8


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

Problem: p02951
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

input_list = list(map(int,input().split()))
print(input_list[2] + input_list[1] - input_list[0])

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):

input_list = list(map(int,input().split()))
a = input_list[2] + input_list[1] - input_list[0]
if a > 0:
    print(a)
else:
    print(0)

Problem: p02951
Buggy submission (PyPy3 (2.4.0), 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(max(0, (c - (a - b))))
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:
12 3 7

Expected output:
0

Actual output:
-2


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

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

Problem: p02951
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
dif = a - b
if c >= dif:
    print(c - dif)
else:
    print('O')

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
O


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

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


Failing test case input:
4 931 -1

Expected output:
926


Actual output:
-927


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

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

a, b, c = map(int, input().split())


print("{}".format(c-(a-b) if c-(a-b) < 0 else 0))

Failing test case input:
-15 4 5

Expected output:
24


Actual output:
0


Fixed submission (verdict: Accepted):

a, b, c = map(int, input().split())


print("{}".format(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(" "))
print(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(max(0, c - (a - b)))

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

if b - a >= c:
    print(c)

else:
    print(b - a)

Failing test case input:
-1 0 29

Expected output:
30


Actual output:
1


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

if a - b >= c:
    print(0)

else:
    print(c - a + b)

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


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

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

def main():
    a, b, c = map(int, input().split())
    print(c - (a - b))


if __name__ == "__main__":
    main()


Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):

def main():
    a, b, c = map(int, input().split())
    result = (c - (a - b))
    if result >= 0:
        print(result)
    else:
        print(0)


if __name__ == "__main__":
    main()

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:
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 = [int(x) for x in 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 = [int(x) for x in input().split()]
print(c-(a-b)) if (c-(a-b)) >= 0 else print("0")

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

Failing test case input:
8 6 16

Expected output:
14


Actual output:
0


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

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
A, B, C = list(map(int, input().split()))
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(C - (A-B) if A-B >= C else 0)

Failing test case input:
-12 0 1

Expected output:
13


Actual output:
0


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 =[int(x) for x in input().split(" ")]
print(C-A+B)

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
A, B, C =[int(x) for x in 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())

ans = min(0, c-abs(a-b))

print(ans)

Failing test case input:
2 36 0

Expected output:
34


Actual output:
-34


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

ans = max(0, c-(a-b))

print(ans)

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

Failing test case input:
1 62 0

Expected output:
61


Actual output:
0


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

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

print(a)
print(b)
print(c)
 
amari = (int(a) - int(b))

if amari > int(c):
  result = 0
else:
  print(int(c) - amari)

Failing test case input:
-11 1 5

Expected output:
17


Actual output:
-11
1
5
17


Fixed submission (verdict: Accepted):
input = input()
 
list = input.split(" ")
a = list[0]
b = list[1]
c = list[2]
 
amari = (int(a) - int(b))

if amari > int(c):
  result = 0
  print(0)
else:
  print(int(c) - amari)

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:
17 -1 5

Expected output:
0


Actual output:
-13


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())

D = C - ( A - B )

print(D)

Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


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

D = C - ( A - B )

print(max(0,D))

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

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


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

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

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

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


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

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 >= 0 else 0)


print(main())

Failing test case input:
0 36 0

Expected output:
36


Actual output:
36
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())
print(c-(a-b))

Failing test case input:
9 0 7

Expected output:
0


Actual output:
-2


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

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


if __name__ == "__main__":
    a,b,c = map(int, input().split())
    if c > a-b:
        print(0)
    else:
        print(c-(a-b))


Failing test case input:
-7 1 1

Expected output:
9


Actual output:
0


Fixed submission (verdict: Accepted):


if __name__ == "__main__":
    a,b,c = map(int, input().split())
    if c < a-b:
        print(0)
    else:
        print(c-(a-b))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main(a, b, c):
    return c - (a - b)


if __name__ == '__main__':
    i = list(map(int, input().split()))
    a, b, c = i[0], i[1], i[2]
    print(main(a, b, c))

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
def main(a, b, c):
    ans = c - (a - b)
    if ans < 0:
        return 0
    return ans


if __name__ == '__main__':
    i = list(map(int, input().split()))
    a, b, c = i[0], i[1], i[2]
    print(main(a, b, c))
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())
if((b-a) < c):
    print(c-(b-a))
else:
    print(0)

Failing test case input:
8 6 16

Expected output:
14


Actual output:
18


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())
s = a-b
if(c > s):
    print(c-s)
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(C)
elif C > A - B:
  print(A - B)


Failing test case input:
-12 0 1

Expected output:
13


Actual output:
-12


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())
print(c-(a-b))

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(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())
if c>b-a:
    print(c-b-a)
else:
    print(0)

Failing test case input:
-15 4 5

Expected output:
24


Actual output:
0


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

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


Failing test case input:
-11 1 3

Expected output:
15


Actual output:
-15


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

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

Failing test case input:
6 228 -1

Expected output:
221


Actual output:
0


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

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

result = c - (a - b)
print(result)

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


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

if c >= a-b:
    result = c - (a - b)
else:
    result = 0
print(result)

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

print(B+C-A)


Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
import math

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

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

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(max((C-(A-B)),0))
Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
if(c < 0):
	print(0)
else:
	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())
if(c-a+b < 0):
	print(0)
else:
	print(c-a+b)

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

Failing test case input:
2 666 0

Expected output:
664


Actual output:
0


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

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

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

Failing test case input:
12 0 7

Expected output:
0


Actual output:
5


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

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

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


Failing test case input:
1 62 1

Expected output:
62


Actual output:

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

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

limit = a - b
ans = c - limit

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())

limit = a - b
ans = c - limit

if ans < 0:
	ans = 0

print(ans)

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
import sys
input=sys.stdin.readline
A,B,C=map(int,input().split())
if C<=A-B:
  print(0)
else:
  print(C-(A-B))

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C=(int(i) for i in input().split(" "))
print(B+C-A)

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
A,B,C=[int(i) for i in input().split(" ")]
print(B+C-A if B+C-A>0 else 0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = (int(x) for x in input().split())

re = a - b
res = c - re

print(res)


Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


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

re = a - b

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

ans = a - b
ans = c - ans

print(ans)

Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


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

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = (int(i) for i in input().split())
print(max(0, c - (b - c)))

Failing test case input:
1 42 6

Expected output:
47


Actual output:
0


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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_num_list = list(map(int,input().split(" ")))

a = input_num_list[0]
b = input_num_list[1]
c = input_num_list[2]

print( b + c - a )

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
input_num_list = list(map(int,input().split(" ")))

a = input_num_list[0]
b = input_num_list[1]
c = input_num_list[2]

x = b + c - a

if x < 0 :
    x = 0

print( x )

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

Failing test case input:
2 396 -1

Expected output:
393


Actual output:
0


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

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 7

Expected output:
0


Actual output:
-2


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 = list(map(int,input().split()))
print(c-(a-b))

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
a,b,c = list(map(int,input().split()))
print(max(c-(a-b),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:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):



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

print(C-min(A-B,C))

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

cnt = 0

if a == b:
    print(0)
elif a >= b+c:
    print(0)
else:
    print(c-(a-b))

Failing test case input:
0 0 29

Expected output:
29


Actual output:
0


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

cnt = 0

if a >= b+c:
    print(0)
elif c - (a-b) <= 0:
    print(0)
else:
    print(c - (a-b))

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:
12 0 4

Expected output:
0


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())

ans = c - (a - b)
print(ans if ans else 0)


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


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

ans = c - (a - b)
if ans > 0:
    print(ans)
else:
    print(0)

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = [int(i) for i in input().rstrip().split(' ')]
print(C-A+B)

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
A,B,C = [int(i) for i in input().rstrip().split(' ')]
r = C-A+B
if r < 0:
    r = 0
print(r)

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:
17 -1 5

Expected output:
0


Actual output:
-13


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

c = c - (a-b)
if c < 0:
    c = 0
print(c)

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())
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())
y1=a-b
y2=c-y1
print(y2)


Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
asize,bwater,cwater = map(int,input().split())

if bwater + cwater > asize:
    cnokori = asize - bwater -1
    print(cnokori)

else:
    print(0)

Failing test case input:
2 54 2

Expected output:
54


Actual output:
-53


Fixed submission (verdict: Accepted):
asize,bwater,cwater = map(int,input().split())

if bwater + cwater >= asize:
    cnokori = cwater - (asize - bwater)
    print(cnokori)

else:
    print(0)

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

ans = C - (A - B)

print(ans)

Failing test case input:
9 -1 5

Expected output:
0


Actual output:
-5


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

ans = C - (A - B)

print(max(ans,0))

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


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

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

Failing test case input:
2 931 -1

Expected output:
928


Actual output:
-1


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
print(max(0,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(0)

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

Failing test case input:
8 6 16

Expected output:
14


Actual output:
18


Fixed submission (verdict: Accepted):

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

else:
    print(c+b-a)

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


import copy
import sys


tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

a=hoge[0]
b=hoge[1]
c=hoge[2]

print(c-(a-b))


Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):


import copy
import sys


tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

a=hoge[0]
b=hoge[1]
c=hoge[2]

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

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

a, b, c = map(int, input().split())
print(min(c, c-(a-b)))


Failing test case input:
-12 0 1

Expected output:
13


Actual output:
1


Fixed submission (verdict: Accepted):

a, b, c = map(int, input().split())
need = a - b
put = min(c, (a-b))
print(c - put)

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:
12 0 7

Expected output:
0


Actual output:
-5


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):
N=list(map(int,input().split()))

print(N[2]-(N[0]-N[1]))

Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


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

print(max(0,(N[2]-(N[0]-N[1]))))

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

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

Failing test case input:
9 0 5

Expected output:
0


Actual output:
5


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

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

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

Failing test case input:
12 0 7

Expected output:
0


Actual output:
-5


Fixed submission (verdict: Accepted):
s = list(map(int, input().split()))
A = s[0]
B = s[1]
C = s[2]
cap = A - B
result = C - cap
if result < 0:
    result = 0
print(result)

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

Failing test case input:
0 6 4

Expected output:
10


Actual output:
4


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

Failing test case input:
-7 20 1

Expected output:
28


Actual output:
0


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

if answer>=0:
  print(answer)
else :
  print(0)

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



def main():
    a, b, c = map(int, input().split())
    print('%d' % (c - (a - b)))


if __name__ == '__main__':
    main()


Failing test case input:
12 3 7

Expected output:
0

Actual output:
-2


Fixed submission (verdict: Accepted):



def main():
    a, b, c = map(int, input().split())
    r = max(c - (a - b), 0)
    print('%d' % r)


if __name__ == '__main__':
    main()

Problem: p02951
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b,c=mp()
print(c-a+b)

Failing test case input:
9 0 5

Expected output:
0


Actual output:
-4


Fixed submission (verdict: Accepted):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b,c=mp()
print(max(c-a+b,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:
2 666 -1

Expected output:
663


Actual output:
2


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

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

D=A-B
E=C-D

print(E)

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
E=C-D

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

Problem: p02951
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = [int(i) for i in input().split(" ")]
res = c-(a-b) if (c > b-a) else 0
print(res)

Failing test case input:
1 54 6

Expected output:
59


Actual output:
0


Fixed submission (verdict: Accepted):
a, b, c = [int(i) for i in input().split(" ")]
res = c-(a-b) if (c > a-b) else 0
print(res)

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

Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


Fixed submission (verdict: Accepted):
input_data = input().rstrip().split(' ')
a = int(input_data[0])
b = int(input_data[1])
c = int(input_data[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=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())
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-b-a)

Failing test case input:
4 931 -1

Expected output:
926


Actual output:
-936


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

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

Failing test case input:
12 0 4

Expected output:
0


Actual output:
-8


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

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:
12 0 4

Expected output:
0


Actual output:
-8


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

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

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

Failing test case input:
0 0 29

Expected output:
29


Actual output:
0


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

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())		
x = C-(A-B)
if x < 0:
	x = 0
print(x)

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


Failing test case input:
17 -1 5

Expected output:
0


Actual output:
-13


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

if remain_c > 0:
  print(remain_c)
else:
  print(0)
Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
def counting_sort(lst,ans,max):
    cnt_lst = [0] * (max+1)
    for i in range(1,len(lst)):
        cnt_lst[lst[i]] += 1
    for j in range(1,max+1):
        cnt_lst[j] = cnt_lst[j] + cnt_lst[j-1]

    for k in range(len(lst)-1,0,-1):
        ans[cnt_lst[lst[k]]] = lst[k]
        cnt_lst[lst[k]] -= 1
    return ans

n = int(input())
n_lst = list(map(int,input().split()))
ans = [0] * len(n_lst)
ans = counting_sort(n_lst,ans,max(n_lst))
print(ans)


Failing test case input:
7
5 3 4 0 12 3 1

Expected output:
0 1 3 3 4 5 12


Actual output:
[0, 0, 1, 3, 3, 4, 12]


Fixed submission (verdict: Accepted):
def counting_sort(lst,ans,max):
    cnt_lst = [0] * (max+1)
    for i in range(0,len(lst)):
        cnt_lst[lst[i]] += 1
    for j in range(1,max+1):
        cnt_lst[j] = cnt_lst[j] + cnt_lst[j-1]

    for k in range(len(lst)-1,-1,-1):
        ans[cnt_lst[lst[k]]-1] = lst[k]
        cnt_lst[lst[k]] -= 1
    return ans

n = int(input())
n_lst = list(map(int,input().split()))
ans = [0] * len(n_lst)
ans = map(str,counting_sort(n_lst,ans,max(n_lst)))
print(' '.join(ans))

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*(n+1)
for i in range(n+1):
    for j in range(n):
        if i == l[j]:
            bucket[i] += 1
            flg = i
print(bucket)
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)



Failing test case input:
7
2 6 1 1 1 6 0

Expected output:
0 1 1 1 2 6 6


Actual output:
[1, 3, 1, 0, 0, 0, 2, 0]
0 1 1 1 2 6 6


Fixed submission (verdict: Accepted):
flg = 0
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    bucket[l[i]] += 1
    if flg < l[i]:
        flg = l[i]
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
def CountingSort(A, B, k):
    C = [0 for i in range(k+1)]
    n = len(A)
    
    for j in range(n):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(n)[::-1]:
        B[C[A[j]]-1] = A[j]
        print(C[A[j]])
        C[A[j]] -= 1


n = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(n)]
CountingSort(A, B, max(A))
print(*B)

Failing test case input:
7
4 9 2 3 0 6 0

Expected output:
0 0 2 3 4 6 9


Actual output:
2
6
1
4
3
7
5
0 0 2 3 4 6 9


Fixed submission (verdict: Accepted):
def CountingSort(A, B, k):
    C = [0 for i in range(k+1)]
    n = len(A)
    
    for j in range(n):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(n)[::-1]:
        B[C[A[j]]-1] = A[j]
        
        C[A[j]] -= 1


n = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(n)]
CountingSort(A, B, max(A))
print(*B)
Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*(n+1)
for i in range(n):
    for j in range(n):
        if i == l[j]:
            bucket[i] += 1
            flg = i

for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)


Failing test case input:
7
4 9 2 3 0 6 0

Expected output:
0 0 2 3 4 6 9


Actual output:
0 0 2 3 4 6


Fixed submission (verdict: Accepted):
flg = 0
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    bucket[l[i]] += 1
    if flg < l[i]:
        flg = l[i]
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*(n+1)
for i in range(n+1):
    for j in range(n):
        if i == l[j]:
            bucket[i] += 1
            flg = i

for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)



Failing test case input:
7
8 9 4 0 12 3 0

Expected output:
0 0 3 4 8 9 12


Actual output:
0 0 3 4


Fixed submission (verdict: Accepted):
flg = 0
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    bucket[l[i]] += 1
    if flg < l[i]:
        flg = l[i]
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*n
for i in range(n):
    for j in range(n):
        if i == l[j]:
            bucket[i] += 1
            flg = i
for i in range(flg-1):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)


Failing test case input:
7
4 12 1 0 6 3 3

Expected output:
0 1 3 3 4 6 12


Actual output:
0 1 3 3 4 6


Fixed submission (verdict: Accepted):
flg = 0
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    bucket[l[i]] += 1
    if flg < l[i]:
        flg = l[i]
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)