TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: N players will participate in a tennis tournament. We will call them Player 1, Player 2, \ldots, Player N.  The tournament is round-robin format, and there will be N(N-1)/2 matches in total. Is it possible to schedule these matches so that all of the following conditions are satisfied? If the answer is yes, also find the minimum number of days required.    * Each player plays at most one matches in a day.   * Each player i (1 \leq i \leq N) plays one match against Player A_{i, 1}, A_{i, 2}, \ldots, A_{i, N-1} in this order.

Submission attempts (in order):
import sys
from itertools import islice
from collections import deque
read = map(int, sys.stdin.read().split())

N = next(read)
A = [deque()] + [deque(islice(read, N - 1)) for _ in range(N)]
day = 0

while True:
    done = set()
    for i in range(1, N + 1):
        if i not in done and A[i]:
            if A[A[i][0]][0] == i and A[i][0] not in done:
                done.add(A[A[i][0]].popleft())
                done.add(A[i].popleft())

    day += 1
    if len(done) == 0:
        for i in A:
            if len(i) > 0:
                print(-1)
                exit()
        else:
            print(day)
            exit()

import sys
from itertools import islice
from collections import deque
read = map(int, sys.stdin.read().split())

N = next(read)
A = [deque()] + [deque(islice(read, N - 1)) for _ in range(N)]
days = 1
available_players = deque(range(1, N + 1))
next_opponent = [0] * (N + 1)
played = set()

while available_players:
    player = available_players.popleft()
    if not A[player]:
        continue

    opponent = A[player].popleft()
    if next_opponent[opponent] == player:
        available_players.append(player)
        available_players.append(opponent)
        next_opponent[player] = 0
        next_opponent[opponent] = 0
        if player in played:
            days += 1
            played.clear()
        played.add(player)
        played.add(opponent)
    else:
        next_opponent[player] = opponent

if next_opponent.count(0) != N + 1:
    print(-1)
else:
    print(days)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has a string S of length N consisting of lowercase English letters. On this string, he will perform the following operation K times:    * Let T be the string obtained by reversing S, and U be the string obtained by concatenating S and T in this order.   * Let S' be some contiguous substring of U with length N, and replace S with S'.  Among the strings that can be the string S after the K operations, find the lexicographically smallest possible one.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()
d=s+s[::-1]
d=d[::-1]
r=d[:n]
e=d[:n]
for i in range(n):
    e=e[1:]+d[n+i]
    r=min(r,e)
t=1
qo=r[0]
for i in range(1,n):
    if qo==r[i]:
        t+=1
    else:
        break
r=r[::-1]
print(r)
for i in range(k-1):
    p=r+r[n-t:]
    p=p[::-1]
    p=p[:n]
    if r==p:
        break
    else:
        r=p[::-1]
        t+=t
print(r[::-1])

n,k=map(int,input().split())
s=input()
d=s+s[::-1]
d=d[::-1]
r=d[:n]
e=d[:n]
for i in range(n):
    e=e[1:]+d[n+i]
    r=min(r,e)
t=1
qo=r[0]
for i in range(1,n):
    if qo==r[i]:
        t+=1
    else:
        break
r=r[::-1]
for i in range(k-1):
    p=r+r[n-t:]
    p=p[::-1]
    p=p[:n]
    if r==p:
        break
    else:
        r=p[::-1]
        t+=t
print(r[::-1])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has a string S of length N consisting of lowercase English letters. On this string, he will perform the following operation K times:    * Let T be the string obtained by reversing S, and U be the string obtained by concatenating S and T in this order.   * Let S' be some contiguous substring of U with length N, and replace S with S'.  Among the strings that can be the string S after the K operations, find the lexicographically smallest possible one.

Submission attempts (in order):
n, k = map(int, input().split())
s = input()
rev_s = s + s[::-1]
mido = "z" * n
for i in range(n + 1):
    if mido > rev_s[i:i + n]:
        mido = rev_s[i:i + n]
ind = float("inf")
for i in range(n):
    if mido[i] != mido[0]:
        if i > ind:
            ind = i
ans = ind * (2 ** (k - 1))
print((mido[0] * ans + mido[ind:ind + n - ans])[:n])

n, k = map(int, input().split())
s = input()
rev_s = s + s[::-1]
mido = "z" * n
for i in range(n + 1):
    if mido > rev_s[i:i + n]:
        mido = rev_s[i:i + n]
ind = float("inf")
for i in range(n):
    if mido[i] != mido[0]:
        if i < ind:
            ind = i
ans = ind * (2 ** min(k - 1, 20))
print((mido[0] * ans + mido[ind:ind + n - ans])[:n])

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a=input("A")
b=input("B")
c=input("C")
i=int(a)-int(b)
j=int(c)-int(i)
if j > 0:
    print(j)
else:
    print('0')


a=input("a")
b=input("b")
i=int(a)-int(b)
c=input("c")
j=int(c)-int(i)
if j > 0:
    print(j)
else:
    print('0')


A, B, C = map(int, input().split())
print(max(C - A + B, 0))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
MI = lambda : map(int,input().split())
a,b,c = MI()
print(c-max(a-b,c))

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
n=int(input())
h=list(map(int,input().split()))
a=True
for i in range(n):
  for j in range(i,n):
    if h[i]-h[j]>1:
      a=False
if a==False:
  print('No')
else:
  print('Yes')

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())
if c<=a-b:
  print(0)
else:
  print(c-a-b)

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
print(max(0,c-b+a))

a,b,c=map(int,input().split())
print(max(0,c-b+a))


a,b,c=map(int,input().split())
print(max(0,c+b-a))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):




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

to_A = A-B 

result = 0

if to_A < C:
    result = C - to_A
else :
    result = 0

print(result)





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

to_A = A-B 

result = 0

if to_A < C:
    result = C - to_A
else :
    result = 0

print(result)

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = [int(x) for x in input().split()]

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

print(str(c))

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

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

print(str(c))

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, input().split())
print(min(a, b+c))


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

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


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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, input().split())
if a > b:
    print(min(c - (a - b), 0))
else:
    print(c)

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
n = int(input())
cnt=0
for i in range(1,n+1):
	if len(str(i))%2==1:
		cnt+=1
print(cnt)

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))
ans = "Yes"
for i in range(N - 1):
  if H[i] > H[i + 1]:
    H[i] = H[i] - 1
    if H[i] - 1 > H[i + 1]:
      ans = "No"
    else:
      H[i] = H[i] - 1

if sorted(H) != H:
  ans = "No"
print(ans)

A, B, C = map(int, input().split())
emp = A - B
ans = C - emp
if ans < 0:
  ans = 0
print(ans)

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):

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

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


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

else:
    print(c+b-a))


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

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


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

else:
    print(c+b-a)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N = input()
H = input()

N = int(N)
H = [int(x) for x in H.split(" ")]
C = 0
R = 0
m = min(H[0], H[1])

while C < (N-1):
    if H[C] - H[C+1] > 1:
        R = 1
        C = N
    elif H[C] - H[C+1] == 1:
        if m > (H[C]-1):
            R = 1
            C = N
        else:
            m = min(m, H[C]-1)
            C += 1
    else:
        C+=1

if R == 0:
    print("Yes")
else:
    print("No")

IN = input()
A, B, C = [int(x) for x in IN.split(" ")]
total = 0
try:
    total = B + min((A-B), C)
    print(total)
except:
    print("ERROR")

IN = input()
A, B, C = [int(x) for x in IN.split(" ")]
total = 0
try:
    total = C - min((A-B), C)
    print(total)
except:
    print("ERROR")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A,B,C = map(int,input())
print(B + C - A)

A,B,C = map(int,input().split())
if B + C - A <= 0:
    print(0)
else:
    print(B + C - A)

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())

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

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

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(c-(a-b)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A.B.C = map(int,input().split())

print(C-(A-B))

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

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A,B,C=map(int,sinput().split())
if(C>=A-B):
  print(C-(A-B))
else:
  print(0)

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())
if b+c>=a:
  print(a)
else:
  print(b+c)

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N=int(input())
H=list(map(int,input().split()))

for i in range(N-1):
    if H[i]>H[i+1]:
        H[i]=H[i]-1
        # if H[i] > H[i + 1]:
        #     A = "no"
        #     break
        # else:
        #     A="yes"



for i in range(N-1):
    if H[i]>H[i+1]:
        A="no"
        break
    else:
        A="yes"

print(A)


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

D=A-B
E=C-D

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = input().strip().split()



a, b, c = input().strip().split()

a, b, c  = int(a), int(b), int(c)

a, b, c = input().strip().split()

a, b, c  = int(a), int(b), int(c)

dif = a - b

if c > dif:
    print(c - dif)
else:
    print(0)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, input().split())
print(max(0, c - (a - b))

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = (int(i) for i in input().split())
print(c - b if b + c > a else 0)

a,b,c = (int(i) for i in input().split())
print(c + b if b + c > a else 0)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A , B , C = map(int,input().split())
L = C-(A-B)
if L <= 0:
  print(L)
else:
  print(0)

A , B , C = map(int,input().split())
L = C-(A-B)
if L >= 0:
  print(L)
else:
  print(0)

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
#include <stdio.h>

int main(){
  int a,b,c,s;
  scanf("%d %d %d",&a,&b,&c);
  s=a-b;
  
  if (s<c){
    printf("%d",c-s);
  }else{
    printf("0");
  }
  
  return 0;
}

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
n = int(input())
h = [int(i) for i in input().split()]

flag = 1
for i in range(len(h)-1):
    for j in range(i+1,len(h)):
        if(h[i]-h[j]>=2):
            print("No")
            flag=0
            break
    if(flag==0):
        break
            
if(flag==1):
    print("Yes")

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

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, input().split())
print(max(a-b,c))

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A,B,C = map(int,input().split())

answer = 0
if A - B <= C
	answer = C - (A - B )
  
else:
	answer = 0

print(answer)

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

answer = 0
if A - B <= C:
	answer = C - (A - B )
  
else:
	answer = 0

print(answer)

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C= map(int, input().split())
if C < (A-B):
    print("0")
else  
    print(C-(A-B))

A, B, C= map(int, input().split())
if C < (A-B):
    print("0")
else:
    print(C-(A-B))

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N = int(input())
H = list(map(int, input().split()))

for i in range(N):
    if i != N-1:
        if H[i] > H[i+1]:
            H[i] -= 1
    if i == N:
        if H[i] < H[i-1]:
            H[i-1] -= 1

for i in range(N):
    if i < N-1:
        if H[i] > H[i+1]:
            print("No")
            exit()
    if i == N:
        if H[i-1] > H[i]:
            print("No")
            exit()
print("Yes")


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

A -= B
C -= A

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


N = input()

A = N.split()[0]
B = N.split()[1]
C = N.split()[2] 

print(C-A+B)


N = input()

A = int(N.split()[0])
B = int(N.split()[1])
C = int(N.split()[2]) 

D = A-B

if D<C:
    print(C-D)

else:
    print(0)

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = map(int, input().split())
print(max(A-B-C, 0))

A, B, C = map(int, input().split())
print(max(C-A-B, 0))

A, B, C = map(int, input().split())
print(max(C-A+B, 0))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
# -*- coding: utf-8 -*-

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


# -*- coding: utf-8 -*-

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


Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
def main():
    a = list(map(int, input().split()))
    print(max(a[2] - (a[0] - a[1], 0))

main()


def main():
    a = list(map(int, input().split()))
    print(max(a[2] - (a[0] - a[1]), 0))
main()


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = int(input())
print(c - (a - b))

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

trans_amouint = min(b - a, c)
print(c - trans_amount)

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

mv_water = min(a - b, c)

print(c - mv_water)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())

print(c-(a-b))

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = map(int, input().split())
if B + C > A:
    print("{}ml".format(B + C - A))
else:
    print('0ml')

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, input().split())
ans = a - b - c
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a = int(input())
l = len(str(a))

ans = 0
if l % 2 == 0:
    while l >= 1:
        ans += 10 ** (l - 1) - 1
        l -= 2
else:
    ans += a - (10 ** (l - 1) - 1)
    l -= 1
    while l >= 1:
        ans += 10 ** (l - 1) - 1
        l -= 2

print(ans)

a = int(input())
l = len(str(a))

ans = 0
if l % 2 == 0:
    while l >= 1:
        ans += 10 ** (l - 1) - 1
        l -= 2
else:
    ans += a - (10 ** (l - 1) - 1)
    l -= 1
    while l >= 1:
        ans += 10 ** (l - 1) - 1
        l -= 2

print(ans)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(int, imput().split())

if c > a-b:
    ans = c-a+b
else:
    ans = 0

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

if c > a-b:
    ans = c-a+b
else:
    ans = 0

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a = list(map(int.input().split()))
print(max(0,a[2]-(a[0]-a[1])))

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A,B,C=map(input().strip())
print(C-A+B)

A,B,C=map(input().split())
can=(A-B)
if (C-can)>0:
    print(C-can)
else:
    print(0)


A,B,C=map(input().strip())
can=(A-B)
if (C-can)>0:
    print(C-can)
else:
    print(0)


A,B,C=map(int,input().split())
can=(A-B)
if (C-can)>0:
    print(C-can)
else:
    print(0)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b, c = map(input().split(), int)
print(c-a+b)

a, b, c = map(int, input().split())
print(max(c-a+b,0))

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())

print(a)

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

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

print(A)

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N=int(input())




list_a=np.arange(1, N+1)
list_b =[]




for i in list_a:
    if  len(str(i))%2 !=0:
        list_b.append(i)

print(len(list_b))


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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):

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

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



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

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


Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
nums = [int(i) for i in input().split()]

A = num[0]
B = num[1]
C = num[2]
 
temp = C - (A - B)
if temp < 0:
  temp = 0
  
print(temp)

A = input()
B = input()
C = input()

temp = C - (A - B)
if temp < 0:
  temp = 0
  
print(temp)

num = [int(i) for i in input().split()]

A = num[0]
B = num[1]
C = num[2]
 
temp = C - (A - B)
if temp < 0:
  temp = 0
  
print(temp)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = map(int, input().sprit())
ans = c-(a-b)

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

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

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = map(int, input().split())
print(min(c-(a-b), 0))

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = [int(i) for i in input().split()]
ans = C - A - B
ans = ans if ans > 0 else 0
print(ans)


A, B, C = [int(i) for i in input().split()]
ans = C - (A - B)
ans = ans if ans > 0 else 0
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = map(int, input().split())
ans = min(A - B, C)
print(ans)


A, B, C = map(int, input().split())
ans = C - min(A - B, C)
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A,B,C = list(map(int,input().split()))

ans=C-(A-B)

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

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

ans=C-(A-B)

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
input_int = input().split()

if input_int[0] >= input_int[1] + input_int[2]:
    print('0')
else:
    print(input_int[2] - input_int[0] + input_int[1])

input_int = input().split()
input_int = [int(x) for x in input_int]

if input_int[0] > input_int[1] + input_int[2]:
    print(0)
else:
    ans = input_int[2] - input_int[0] + input_int[1]
    print(ans)

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = = map(int,input().split())

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

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

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

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

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
n=int(input())
h=list(map(int,input().split()))
ans=0
for i in range(0,n-1):
  if h[i]<=h[i+1]:
    ans+=0
  elif h[i]>=h[i+1]+2:
    ans+=1
  else:
    if i<(n-2):
      if h[i+1]<=h[i+2]:
        ans+=0
      else:
        ans+=1    
    else:
      if h[i]>h[i-1]:
        ans+=0
      else:
        ans+=1
        
if ans==0:
    print("Yes")
else:
    print("No")


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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input.split())
print(c-a+b)

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
def main():
    output = C - A + B
    if output < 0:
        return 0
    return output

def main():
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
 
main()

def main():
    N = int(input())
    i = 0
    while N >0:
        n = int(str(N)[-1])
        if n % 2 != 0:
            i+=1
        N -= 1
    print(i)
main()

def main():
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)

main()

def rest_of_water(a, b, c):
   output = c-(a-b)
   if output < 0:
   	    output = 0
   return output

output = C -(A-B)
if output < 0:
    return 0
return output

A= int(input())
B= int(input())
C= int(input())
output = C - A + B
if output < 0:
    print(0)
else:
    print(output)


def main():
    A= int(input())
    B= int(input())
    C= int(input())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()

def main():
    N = int(input())
    i = 0
    while N >0:
        n = int(str(N)[-1])
        if n % 2 != 0:
            print("yes")
            i+=1
        N -= 1
    print(i)
main()

def main():
    A, B, C = map(int, input().split())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())
box=a-b
c-=box
ans=min(box,0)
print(ans)

a,b,c=map(int,input().split())
box=a-b
c-=box
ans=max(c,0)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c = map(int,input().split())
ans=c-(a-b)
if ans <= 0:
  print(ans)
else:
  print(0)

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C, = taple(map(int, input().split()))
if (A - B) >= C:
  	print(0)
else:
  	print(C - (A - B))


A,　B, C, = taple(map(int, input().split()))
if (A - B) >= C:
  	print(0)
else:
  	print(C - (A - B))

A, B, C, = tuple(map(int, input().split()))
if (A - B) >= C:
  	print(0)
else:
  	print(C - (A - B))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a, b = map(int,input().split())

if a + b >= a - b and a + b >= a * b:
    print(a+b)
elif a-b >= a+b and a-b >= a*b:
    print(a-b)
else:
    print(a*b)

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

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

if c >= 0:
    print(c)
else:
    print('0')

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = (int(i) for i in input().split())

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

A, B, C = (int(i) for i in input().split())

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

Verdicts: Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(max(c-(a-b)),0)

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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
def mapt(fn, *args):
    return tuple(map(fn, *args))


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


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


main()

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
a,b = map(int,input().split())
x = a + b
y = a-b
z = a* b
print(max(x,y,z))

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


Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
A, B, C = map(int, input().split())

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

A, B, C = map(int, input().split())
print(max( C - (A - B), 0))

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
N = int(input())
if N < 10 :
	print(N)
elif N < 100 :
	print(9)
elif N < 1000 :
	print(9 + (N - 100 + 1))
elif N < 10000 :
	print(9 + 900)
elif N < 100000 :
	print(9 + 900 + (N - 10000 + 1))
else :
	print(9 + 900 + 90000)


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

Verdicts: Runtime Error

Accepted
Problem: We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2?

Submission attempts (in order):
ans = a-b-c
if ans < 0:
    print(ans*-1)
else:
    print(0)

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

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

Verdicts: Runtime Error

Accepted