TnT/Multi_CodeNet4Repair huggingface dataset:
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()))
sv = h[n-1]
ok = True
for i in range(n-1):
    if h[i] - sv - 1 >= 2:
        ok = False

if ok:
    print('Yes')
else:
    print('No')

a, b, c = map(int, input().split())
if a - b < c:
    ans = c - (a - b)
else:
    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())
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 = input()

cnt = c - a + b

if(cnt < 0):
  cnt = 0
else:
  continue
  
print(cnt)

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

cnt = c - a + b

if(cnt < 0):
  cnt = 0

print(cnt)


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-A+B

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

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

A, B, C = [int(x) for x in input().split()]

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


A, B, C = [int(x) for x in input().split()]

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


A, B, C = [int(x) for x in input().split()]

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



Verdicts: Runtime Error

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

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

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

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

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

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

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


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

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


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

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())
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):
A,B,C = map(int,input().split())
s = B - A
test = C - s
print(test)

N = int(input())
H = list(map(int, input().split()))
ans = True
for i in range(1,len(H)):
    if (H[i-1] - H[i]) == 1:
        H[i-1] -= 1
    elif (H[i-1] - H[i]) <= 0:
        continue
    else:
        ans = False
        break
H.reverse()
for i in range(1,len(H)):
    if H[i-1]-H[i] >=  0:
        pass
    else:
        ans = False
        break
if ans:
    print("Yes")
else:
    print("No")

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

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 = input().split()
temp = C-A-B
if temp < 0:
  temp = 0
print(temp)

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

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

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().split())
sa = a-b
if sa >= c:
    print(sa-c)
else:
    print(c)


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


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


#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

ans = c - (a-b)

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


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

ANS=[0]*6
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    ANS[5]
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N%10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

x=input().split()

for i in range(3):
  y[i]=int(x[i])

y=[0]*3
ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<0:
    print(0)

x=input().split()

y=[0]*3

for i in range(3):
  y[i]=int(x[i])

ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<=0:
  print(0)

Verdicts: 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):
N = int(input())
A = list(map(int, input().split()))
if N > 2:
    for i in range(N-2):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-2):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 2:
    if A[0] <= A[1]:
        print("Yes")
    else:
        print("No")
elif N == 1:
    print("Yes")


N = int(input())
A = list(map(int, input().split()))
if N > 1:
    for i in range(N-1):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("Yes")

N = int(input())
A = list(map(int, input().split()))
if N > 2:
    for i in range(N-2):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-2):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
        print(range(0))
elif N == 2:
    if A[0] <= A[1]:
        print("Yes")
    else:
        print("No")
elif N == 1:
    print("Yes")


N = int(input())
A = list(map(int, input().split()))
if N > 1:
    for i in range(N-1):
        if A[i]>A[i+1]:
            A[i] -= 1
            
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
else:
    print("Yes")

N = int(input())
A = list(map(int, input().split()))
if N > 2:
    for i in range(N-1):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
        print(range(0))
elif N == 2:
    if A[0] <= A[1]:
        print("Yes")
    else:
        print("No")
elif N == 1:
    print("Yes")


N = int(input())
A = list(map(int, input().split()))
if N > 1:
    for i in range(N-1):
        if A[i]>A[i+1]:
            A[i] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 1:
    print("Yes")


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


Verdicts: Runtime Error

Runtime Error

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

d = a - b

if c <= d:
  print(b+c)
elif c > d:
  print(a)

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

d = a - b

if c <= d:
  print(0)
elif c > d:
  print(c - d)

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())
ans = 0
for i in range(1, N + 1):
    if len(str(i)) % 2 is 1:
      ans += 1
      
print(ans)

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

N = input()
ans = 0
for i in range(1, N + 1):
    if len(str(i)) % 2 is 1:
      ans += 1
      
print(ans)

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

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

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 = int(input())
B = int(input())
C = int(input())

if B != C:
	surplus = A - B
	ans = C - surplus 
	print(ans)
else:
	print(0)

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


ans = C - (A - B)
if ans == 0:
	ans = 0

print(ans)

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


if B != C {
	surplus = A - B
	result = C - surplus 
	print(result)
} else { 
	 print(0)
}

a = int(input())
b = int(input())
c = int(input())

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

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

if B != C:
	surplus = A - B
	result = C - surplus 
	print(result)
else:
	print(0)


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

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

Verdicts: Runtime Error

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):
n=int(input())
if n<=9:
  print(n)
elif n<=99:
  print(9)
elif n<=999:
  print(n-90)
elif n<=9999:
  print(909)
elif n==100000:
  print(90909)
else:
  print(n-9090)


a,b,c=map(int,input().split())
if (c+b-a)>0:
  print(c+b-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):
n = int(input())
h_lis = list(map(int,input().split()))
for i in range(n-1):
  if h_lis[i]-h_lis[i+1] == 1:
    h_lis[i] -= 1
  else:
    pass
    

for i in range(n-1):
  if h_lis[i]-h_lis[i+1] > 0:
    print('No')
    break
else:
  print('Yes')

    

a,b,c = map(int ,input().split())
print(b + c -a if b + c-a >= 0 else 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(x) for x in input().split())

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


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

if a == b:
    print(c)
elif 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):
s = input()
n = len(s)

n_r = [-1 for i in range(n)]

n_l = [-1 for i in range(n)]

nearest_r = 0

for i in range(n):
    if s[i] == "R":
        nearest_r = i
    else:
        n_r[i] = nearest_r

nearest_l = n-1

for i in range(n-1,-1,-1):
    if s[i] == "L":
        nearest_l = i
    else:
        n_l[i] = nearest_l

answers = [0 for i in range(n)]

for i in range(n):
    if s[i] == "R":
        if (n_l[i] - i)%2 == 0:
            answers[n_l[i]] += 1
        else:
            answers[n_l[i]-1] += 1
    else:
        if (i - n_r[i])%2 == 0:
            answers[n_r[i]] += 1
        else:
            answers[n_r[i]+1] += 1

ans  =""
for i in range(n):
    ans += str(answers[i])
    if i != n-1:
        ans += " "

print(ans)

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=input()
x=len(n)
if x==1:
    print(n)

elif x<3:
    print(9)
elif x==3:
    print(9+int(n)-100+1)
elif x<5:
    print(909)
elif x==5:
    print(9+900+int(n)-10000+1)
else:
    print(90909)

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

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

a, b, c = map(int,input().split())
d = c - (a - b)
if d >= 0:
    print(d)
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 = map(int,input().split())
if (a+b) % 2 ==0:
  print((a + b)// 2)
else:
  print("IMPOSSIBLE")


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

c = 0
for i in range(a):
  if i>0:
    if (int(b[i-1]) - int(b[i])>1):
      c=1
if c==1:
  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):
n=int(input())
h=list(map(int,input().split()))
ans="Yes"
cngh=0
bkh=0
for i in range(n):
  if bkh>h[i]:
    if cngh!=h[i-1]:
      if bkh-1==h[i]:
      	cngh=h[i]
      else:
        ans="No"
        break
    else:
      if cngh!=h[i]:
        ans="No"
        break
  bkh=h[i]
print(ans)

a,b,c=map(int,input().split())
print(0 if c-(a-b)<0 else 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 = int(input())
B = int(input())
C = int(input())

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

n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(int(i))//2 == 1:
    count += 1
 
print(count)

n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(int(i))%2 == 1:
    count += 1
 
print(count)

n = int(input())
count = 0
 
for i in n:
  if len(i)%2 != 0:
    count += 1
 
print(count)

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

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

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")


N = int(input())
H = []
H = input().split(" ")
for i in range(N):
    H[i] = int(H[i])

ochinchin = True
for i in range(1, N):
    if H[i]<H[i-1]:
        H[i-1] -= 1
        if H[i]<H[i-1]:
            ochinchin = False
            break
        elif i >= 2:
            if H[i-1]<H[i-2]:
                ochinchin = False
                break

if ochinchin:
    print("Yes")
else:
    print("No")


N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-2):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")


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

from sys import stdin
a = stdin.readline().rstrip()
b = stdin.readline().rstrip()
c = stdin.readline().rstrip()

A = int(a)
B = int(b)
C = int(c)


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

a = int(input())
unchi = 0
for i in range(1,a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-1):
    if A[i] >> A[i+1]:
        A[i] -= 1
    if A[i+1] >= A[i]:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")



a = int(input())
unchi = 0
while a>=1:
    a -= 1
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


N = int(input())
A = list(map(int, input().split()))
chinpo = 0

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N:
    print("Yes")
else:
    print("No")

from sys import stdin
A = stdin.readline()
B = stdin.readline()
C = stdin.readline()

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


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

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


a = int(input())
unchi = 0
for i in range(a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)


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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

    judge = 'Yes'

    H[0] = H[0] - 1

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

    for i in range(1,N):
        if H[i-1] > H[i]:
            judge = 'No'
            
    print(judge)

if __name__ == '__main__' :
    main()

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

    ans = C-(A-B)
    if ans <= 0:
        ans = 0

    print(ans)


if __name__ == '__main__' :
    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):
N = int(input())
H = list(map(int,input().split()))
state = 0
L = []
cnt = 0
cnt2 = 0
for i in range(1,len(H)):
    d = H[i]-H[i-1]
    if d<0:
        H[i-1] = H[i-1] - 1
for i in range(1,len(H)):
    d = H[i]-H[i-1]
    if d<0:
        cnt+=1
    elif d == 0:
        cnt2+=1

if cnt>0:
    print("No")
elif cnt2 == len(H)-1 and len(H)>=2:
    print("No")
else:
    print("Yes")


A,B,C = map(int,input().split())
delta = A-B
ans = C - delta
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 = input().split()
print(max(b+c-a, 0))


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

a,b,c = list(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):
array =  list(map(int, input().split(' ')))
a = array[0]
b = array[1]
c = array[2]

d = a-b

if d > c:
    print(c)
else:
    print(d-c)

array =  list(map(int, input().split(' ')))
a = array[0]
b = array[1]
c = array[2]

d = a-b

if (c - d) < 0:
    print(0)
else:
    print(c-d)

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(0,c-a+b)

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

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):
num = input()

result = 0

if len(num) != 1:
  result = int((len(num)-2)//2 * ("90") + "9")

if len(num) % 2 == 0:
  print(result)
else:
  AAA = int("1" + (len(num) - 1) * "0") - 1
  print(result + int(num) - AAA)

strList = input().split()
A, B, C = [int(s) for s in strList]

if (A - B) >= C:
    print(0)
elif A - B < C:
    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())
res = 0
keta = 1
for i in range(1, n+1):
  if i % (10 ** keta) == 0:
    keta += 1
  if keta % 2 == 1:
    res += 1
print(res)

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):
vals = input().split()
dif = vals[0] - vals[1]

if dif >= vals[3]:
  print 0
else:
  print vals[3] - dif

vals = input().split()
dif = vals[0] - vals[1]
 
if dif >= vals[3]:
  print(0)
else:
  print(vals[3] - dif)

import fileinput

for line in fileinput.input():
    vals = line.split()
    print min(vals[0] - vals[1], vals[2])

vals = [int(x) for x in input(). split()]
dif = vals[0] - vals[1]
 
if dif >= vals[2]:
  print(0)
else:
  print(vals[2] - dif)

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):
n = int(input())
h = list(map(int, input().split()))
h.append(10000000000)
max = 0
flag = 0

for i in range(n):

    if h[i+1]<h[i]:
        h[i]=h[i]-1
    if h[i]>=max and h[i+1]>=h[i]:
        max = h[i]
    else:
        flag = 1
        break
if flag == 1:
    print('No')
else:
    print('Yes')


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


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):
import sys
args = sys.argv
a = int(args[1])
b = int(args[2])
c = int(args[3])

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

restWater()

s = list(map(int, input().split()))
a = s[0]
b = s[1]
c = s[2]

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

restWater()

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())
a = list(map(int, input().split()))
a.reverse()
count = 0
for i in range(n-1):
    if a[i+1] > a[i]:
        a[i+1] -= 1
for i in range(n-1):
    if a[i+1]>a[i]:
        count +=1
if count == 0:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

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

input = input()
 
list = input.split(" ")
a = list[0]
b = list[1]
c = list[2]

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


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)

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):
def main():
    if(1 <= b and b <= a and a <= 20 and 1 <= c and c <= 20): 
        i = list(map(int, input().split()))
        a = i[0]
        b = i[1]
        c = i[2]

        

        k = c - a + b

        print(k)


if __name__ == "__main__":
    main()


def main():

    i = list(map(int, input().split()))
    a = i[0]
    b = i[1]
    c = i[2]

    if  not (1 <= b and b <= a and a <= 20 and 1 <= c and c <= 20):      
        return

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

    print(k)


if __name__ == "__main__":
    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):
def main():
    s = input()
    [a, b, c] = [int(number) for number in s.split()]

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

if __name__ == '__main__':20
    """
    main()

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

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

if __name__ == '__main__':
    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):
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
s = sum(A)
flag = False
def make_divisors(n):
    divisors = []
    for i in range(int(n**0.5), 0, -1):
        if n%i == 0:
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    return sorted(divisors, reverse=True)
divs = make_divisors(s)
for x in divs:
    if flag:
        break
    sortedA = sorted([a%x for a in A])
    sumA = sum(sortedA)
    index_len = len(sortedA)
    sump = 0
    for i, a in enumerate(sortedA):
        sump += a
        summ = x*(index_len - (i+1)) - (sumA - sump)
        if sump == summ and sump <= K:
            print(x)
            flag = True
            break



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


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):
num = input().split()
a = num[0]
b = num[1]
c = num[2]
ans = b + c - a
if ans > 0:
    print(ans)
else:
    print(0)


n = int(input())
odd = []
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        odd.append(i)
print(len(odd))


num = input().split()
a = int(num[0])
b = int(num[1])
c = int(num[2])
ans = b + c - a
if ans > 0:
    print(ans)
else:
    print(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):
# -*- coding: utf-8 -*-

N = int(input())
H = list(map(int, input().split()))

max = 0
ans = "Yes"
for i in range(N-1):
    if max - H[i] > 1:
        ans = "No"
        break
    max = max(max, H[i])
    
print(ans)



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

N = int(input())
H = list(map(int, input().split()))

max = 0
ans = "Yes"
for i in range(N):
    if max - H[i] > 1:
        ans = "No"
        break
    max = max(max, H[i])

print(ans)



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

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):
N = int(input())
H = list(map(int,input.split()))
ANS = True
for i in range(1,N):
    if H[N-i] >= H[N-i-1]:
        continue
    else if (H[N-i] - H[N-i-1]) == -1:
        H[N-i-1] += 1
    else:
        ANS = False
        break
if ANS:
    print('Yes')
else:
    print('No')

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


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

answer = (b + c) % a

print(answer)

A, B, C = input().split()
 
answer = (B + C) % A
 
print(answer)

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

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):
n = int(input())
h = [int(x) for x in input().split()]
h_max = max(h)

if n == 1:
    print('Yes')
elif h_max - 1 <= h[n-1]:
    print('Yes')
else:
    print('No')

a, b, c = (int(x) for x in 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):
x = int(input())

if x <10:
  print(x)
elif x<99:
  print(9)
elif x<999:
  print(9+(x-99))
elif x<9999:
  print(909)
elif x<99999:
  print(909+(x-9999))
elif x==100000:
  print(90909)

x = int(input())
 
if x <=9:
  print(x)
elif x<=99:
  print(9)
elif x<=999:
  print(9+(x-99))
elif x<=9999:
  print(909)
elif x<=99999:
  print(909+(x-9999))
elif x ==100000:
  print(90909)

x = int(input())

if x <10:
  print(x)
elif x<99:
  print(9)
elif x<999:
  print(9+(x-99))
elif x<9999:
  print(909)
elif x<99999:
  print(909+(x-9999))
else:
  print(90909)

x = input().split()


d = int(x[2])-(int(x[0])-int(x[1]))

if d>=0:
  print(d)
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(int,input().split())
if C+B-A < 0:
  print(0)
else:
  print(C+B+A)

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

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

print(c-(a-b))a

a, b, c = [int(i) for i in 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):
A,B,C = map(int, input().split())
print(C-A-B)

A,B,C = map(int, input().split())
ans = C-(A-B)
if ans > 0:
  print(ans)
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 = input().split()
A = int(A)
B = int(B)
C = int(C)

if A-B-C<=0:
  print('0')
else:
  print(-1*(A-B-C))

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

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

while b <= a:
    c -= 1
    b += 1

print(c)


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

while b < a:
    c -= 1
    b += 1
    if c == 0:
        break

print(c)


Verdicts: Wrong Answer

Accepted