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

print(float(c-a+b))


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

print(float(c-a-b))

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

a,b,c = map(int,input().split())
if(b+c >= a):
  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 = int(input("A"))
B = int(input("B"))
C = int(input("C"))

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

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

if A >= B + C:
    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):
n=int(input())
hlist=input().split()
hlist=list(map(int, hlist))
counter=0
counter2=0
counter3=0
hantei=0
for i in range(n-1): 
	if hlist[i]<=hlist[i+1]:
		counter=counter+1
		
for i in range(n): 
	if hlist[i]==hlist[0] or hlist[0]+1:
		#counter2=counter2+1

for i in range(n): 
	if hlist[i]==hlist[0] or hlist[0]-1:
		counter3=counter3+1


		
if counter==n-1 or counter2==n or counter3==n:
	hantei=1
	
if hantei==1:
	print("Yes")
else:print("No")

[a,b,c]=list(map(int, input().split()))
nokori=c-a+b
if nokori<0:
	nokori=0
print(nokori)

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):
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using P = pair<int,int>;
//using T = tuple<string, int, int>;

int main() {
  int A,B,C;
  cin >> A >> B >> C;
  cout << max(C-(A-B), 0) << endl;

  return 0;
}

// https://github.com/atcoder/live_library

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

print(max(0,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=input(" ").split(" ")
A=int(a[0])
B=int(a[1])
C=int(a[2])
print(C-A+B)


a=int(input())
b=input().split(" ")
f=[]
if a>=3:
    for p in range (0,a-2):
        if int(b[p])-int(b[p+1])>1:
            f.append("miss")
        elif int(b[p])-int(b[p+1])==1:
            if int(b[p+1])-int(b[p+2])==1:
                f.append("miss")
    if int(b[a-2])-int(b[a-1])>1:
        f.append("miss")
elif a=3:
    if int(b[0])-int(b[1])>1:
        f.append("miss")
    elif int(b[1])-int(b[2])>1:
        f.append("miss")
    elif int(b[0])-int(b[2])>1:
        f.append("miss")
elif a=2:
    if int(b[0])-int(b[1])>1:
        f.append("miss")

if "miss" not in f:
    print("Yes")
else:
    print("No")

a=input().split(" ")
A=int(a[0])
B=int(a[1])
C=int(a[2])
if C-A+B>=0:
    print(C-A+B)
else:
    print(0)


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


a,b,c=(int(x) for x in input().split())
d=c-a+b
if d<=0:
    print(0)
else:
    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):
if C >= A -B:
  print(C - A + B)
else:
  Print(0)


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

print(c-a+b if c > a-b 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=list(mao(int,input().split()))
print(max(0,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):
a,b,c = int(input());
if((a-b)<c):
  print(c-(a-b))
else:
  print(0)

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


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


if a == b:
    num1 = a
else:
    num1 = a - b

if c =< num1:
    print(0)
else:
    print(c - num1)

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

diff = a - b

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


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().aplit())
print(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((b+c)-a)
else:
  print("0")

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

a,b,c = map(int,input().split())
if b+c > a:
  print(b+c-a)
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):
N = int(input())
cnt = 0
for i in range(1,N+1):
    if len(str(i)) % 2 != 0:
        cnt += 1
print (cnt)


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

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

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(i) for i in input().split(" ")]
b = max((a[2]-(a[0]-a[1]), 0)
print(b)


a = [int(i) for i in input().split(" ")]
b = max(a[2]-(a[0]-a[1]), 0)
print(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):
def solve():
    a,b,c = map(int, input().split())
   return c-(a-b)

if __name__ == '__main__':
    print(solve())

def solve():
    a,b,c = map(int, input().split())
    return max(c-(a-b),0)

if __name__ == '__main__':
    print(solve())

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

    return b+c if a > b+c else a
def main():
    a, b, c = map(int, input().split())
    print(transfer(a, b, c))

if __name__ == '__main__':
    main()


def transfer(a, b, c):

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

if __name__ == '__main__':
    main()


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

if N < 10:
    print(N)
elif 10 <= N and N < 100:
    print(9)
elif 100 <= N and N < 1000:
    print(N-90)
elif 1000 <= N and N < 10000:
    print(909)
elif 10000 <= N and N < 100000:
    print(N-9090)
elif 100000 == N:
    print(90909)

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=$1-$2,ans=$3-a{print ans}

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

diff = a - b - c

if diff => 0:
  print(0)
else:
  print(-diff)

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

diff = a - b - c

if diff >= 0:
  print(0)
else:
  print(-diff)

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 python
# coding: utf-8

# In[ ]:


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


# In[ ]:


print(int(C-A-B))



#!/usr/bin/env python
# coding: utf-8

# In[ ]:


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


# In[ ]:


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

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

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

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

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

a, b, c = list(map(int, input().split()))
d = c - (a - b)
if d > 0:
  print(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):
num = input()
list_step = [int(i) for i in input().split()]
 
minus = False
for i in range(int(num)-1):
  diff = list_step[i+1] - list_step[i]
  if diff >= 0:
    minus = False
    continue
  elif diff < -1:
    print("No")
    exit()
  elif i!=0:
    if list_step[i-1]>list_step[i]:
      print("No")
      exit()
    elif list_step[i-1] == list_step[i] and minus:
      print("No")
      exit()
  minus = True
 
print("Yes")

a, b, c = [ int(i) for i in 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(c-(a+b))

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


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

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

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

answer = C-A+B

if answer >= 0:
print(answer)

else :
print(0)

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

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

else :
print(C-A+B)

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

if B+C <= 20
print(0)

else B+C > 20
print(C-A+B)

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


if B+C <= A
print(0)

else B+C > A
print(C-A+B)

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

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

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

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

answer = C-A+B

if answer > 0:
print(answer)

else :
print(0)

input()

if B+C <= 20
print(0)

else B+C > 20
print(C-A+B)

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


if B+C <= 20
print(0)

else B+C > 20
print(C-A+B)

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

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

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

A, B, C = input()

if B+C <= 20
print(0)

else B+C > 20
print(C-A+B)

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

answer = C-A+B

if answer >= 0:
	print(answer)

else :
	print(0)

Verdicts: 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):
x = list(map(int, input().split()))
x[0] = -1*x[0]
sum(x)

x = map(int, input().split())
x[0] = -1*x[0]
print(sum(x))

x = list(map(int, input().split()))
x[0] = -1*x[0]
print(max(sum(x), 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 = map(int, input().split())

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

else:
    print(b - a)

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

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

else:
    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

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):
tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  
    tmp //= 10  
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1


if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num


else:
    
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)

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

flag = 0

if len(lst) == 1:
    flag = 1

for i in range(0,len(lst)-1):
    if lst[i]-1 == lst[i+1]:
        lst[i] = lst[i] - 1



if flag == 0:
    for i in range(0,len(lst)-1):
        if (lst[i] <= lst[i+1])&(flag==0):
            #print(str(lst[i])+'<='+str(lst[i+1]))
            flag = 0
        else:
            flag = 1



if flag == 0:
    print('Yes')
else:
    print('No')

tmp = int(input())
#tmp = 100000

input_num = tmp

lst = []
while tmp > 0:
    lst.append(tmp % 10)  
    tmp //= 10  
lst.reverse()

# print(lst)

# print(input_num)

ketasuu = len(lst)
ans = 0
flag = 0
tmp = 0

kazoeru = ketasuu - 1


if ketasuu % 2 == 0:
    for keta_num in reversed(range(kazoeru)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

elif ketasuu == 1:
    ans = input_num


else:
    
    ans = input_num - ((10 ** kazoeru) * lst[0])
    ans = ans + 1

    for keta_num in reversed(range(kazoeru - 1)):

        if flag == 0:
            tmp = (10 ** keta_num) * 9
            ans = ans + tmp
            # print("{} {}".format(ans,tmp))
            flag = 1
        else:
            flag = 0

print(ans)

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

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):
import math
 
N = int(input())
 
count = 0
for i in range(1, N+1):
  if math.floor(math.log10(i)) % 2 == 0:
    count += 1
print(count)

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

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

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

a,b,c = list(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 = int(input().split()) 
x = a - b
if c <= x:
	print(0)
else:
	y = c - x
	print(y)

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

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

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

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

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(range(n))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)


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

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


a,b,c=map(int,input().split())
d=a-b
e=c-d
if e>=0:
  print(e)
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())
    print(max(0,c-max(0,a-b)))

def resolve():


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

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 < 0:
        print('0')
    else:
        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())

ans=0

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

print(ans)

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

ans=0

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

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):
import sys
stdin = sys.stdin
from itertools import accumulate

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

n = ni()
h = na()
f = h[0]
b = False
for hi in h[1:]:
    if hi > f:
        f = hi
        b = False
    elif hi == f - 1 and not b:
        f = hi
        b = True
    elif hi == f:
        b = True
    else:
        print("No")
        quit()
print("Yes")

from itertools import accumulate, permutations, combinations, product, combinations_with_replacement, groupby
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, c = na()
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):
cap, current, rem = input.split()
cap, current, rem = int(cap), int(current), int(rem)

while current < cap and rem > 0:
  current += 1
  rem -= 1
print(rem)

cap, current, rem = input().split()
cap, current, rem = int(cap), int(current), int(rem)
 
while current < cap and rem > 0:
  current += 1
  rem -= 1
print(rem)

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-99)
  
  
elif N < 10000:
  print(909)
  
elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)

A, B, C = input()
 
D = A - B

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

N = int(input())


if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(90909)


N = int(input())

if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)


N=int(input())

if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ N-99)
elif N < 10000:
  print(909)
elif N < 100000:
  print(909 + N - 9999)
else:
  print(90909)


A, B, C = input()

D = A - B


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

N = int(input())

num = 0
if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ n-99)
  
elif N <10000:
  print(909)

elif N < 100000:
  print(90909)


N=int(input())

if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)


A, B, C = input().split(" ")
 
D = A - B

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


N = int(input())


if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)


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

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


Verdicts: 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):
n = int(input())
h = [map(int, input().split())]
s = 1
for i in range(n):
  flag = 0
  for j in range(n-1-i):
    if h[j] <= h[n-1-i] + 1:
      flag += 0
    else:
      flag += 1
  if flag != 0:
    s *= 0
if s = 0:
  print("No")
else:
  print("Yes")


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

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

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 = int(input())
row = [int(s) for s in input().split()]
row[0] -= 1
for i in range(num - 1):
  if row[i + 1] > row[i]:
    row[i + 1] -= 1

p = 0
for i in range(num - 1):
  if row[i] <= row[i + 1]:
    p += 1
    
if p == num - 1:
  print("Yes")
else:
  print("No")

a = input().split( )
num = int(a[2]) - (int(a[0]) - int(a[1]))

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

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(int, input().split()))
max(c - (a-b), 0)

a, b, c = list(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):
S = list(input())
n = len(S)
H = []


for i in range(0,n):
  H.append(1)

for j in range(0, 1000001):
  for i in range(0,n):
    if S[i] == 'R':
      if H[i] != 0:
      	H[i] -= 1
      	H[i+1] += 1
      else:
        continue
    elif S[i] == 'L':
      if H[i] != 0:
        H[i] -= 1
        H[i-1] += 1
      else:
        continue

print(H)

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

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

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())
ans = 0
for i in range(1,n + 1):
    if 10 <= i < 100 or 1000 <= i < 10000 or i == 100000:
        ans += 0
    else:
        ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1, n + 1):
    if 10 <= i < 100 or 1000 <= i < 10000 or i == 100000:
        continue
    else:
        ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1,n + 1):
    if 10 <= i < 100 or 1000 <= i < 10000 or i == 100000:
        ans = ans
    else:
        ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1, n + 1):
    if 10 <= i < 100 or 1000 <= i < 10000:
        continue
    else:
        ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1,n + 1):
    if 10 <= i < 100 or 1000 <= i < 10000 or i == 100000:
        continue
    else:
        ans += 1
print(ans)

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

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

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

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


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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

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

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

A=B+D

E=C-D

print(E)

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):
s = str(input()) + 'R'
rcnt = 0
lcnt = 0
flag = 0
ans = [0]*(len(s)-1)
rpos = 0
lpos = 0

for i in range(len(s)):
    if s[i] == 'R':
        if flag == 1:
            if rcnt % 2 == 0:
                ans[rpos] += rcnt//2
                ans[lpos] += rcnt//2
            else:
                ans[rpos] += rcnt//2 + 1
                ans[lpos] += rcnt//2
            if lcnt % 2 == 0:
                ans[rpos] += lcnt//2
                ans[lpos] += lcnt//2
            else:
                ans[rpos] += lcnt//2
                ans[lpos] += lcnt//2 + 1
            rcnt = 0
            lcnt = 0
        flag = 0
        rcnt += 1
        rpos = i
    elif s[i] == 'L':
        if flag == 0:
            lpos = i
        flag = 1
        lcnt += 1
print(*ans)
        

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

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

number = input().split(" ")
A = int(number[0])
B = int(number[1])
C = int(number[2])
if A < B + C:
	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(nt, input().split())

ans = a

if a > b+c:
  ans = b+c

print(ans)

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

ans = 0

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

print(ans)

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

ans = a

if a > b+c:
  ans = b+c

print(ans)

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

ans = 0

if a < b+c:
  ans = c-(a-b)

print(ans)

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

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

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

ab = l[0] - l[1]
cab = l[2] - ab

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

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

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

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())
d = b - a
print(max(0, c - d))

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

D=A-B

E=D-C

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



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

D=A-B

E=C-D

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



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):
bottle1, water, bottle2 = map(int, input().split())
empty = bottle1 - water
if empty =< bottle2:
  print(bottle2 - empty)
else:
  print(0)

bottle1, water, bottle2 = map(int, input().split())
empty = bottle1 - water
if empty <= bottle2:
  print(bottle2 - empty)
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):
import copy

S = input()
nN = len(S)
nAns = [ 1 for i in range(nN)]
nAnsC = [ 0 for i in range(nN)]

for j in range(10**3):
  nAnsT = [ 0 for i in range(nN)]
  for i in range(nN):
    sTmp = S[i]
    
    if nAns[i]==0:
      continue
    nNum = nAns[i]
    nAns[i] = 0
    if sTmp =='R':
      nTmp = i + 1
    elif sTmp =='L':
      nTmp = i - 1
    nAnsT[nTmp] += nNum
  
  nAns = copy.deepcopy(nAnsT)
  if i==1:
    nAnsC = copy.deepcopy(nAnsT)
  else:
    nTmp2 = i
    nTmp2 &= 1
    if nTmp2 == 1:
      if nAns == nAnsC:
        break
      else:
        nAnsC = copy.deepcopy(nAns)
      
#    print(*nAns)
#  sTmp = S[nTmp]
#  if sTmp =='R':
#    nTmp += 1
#  elif sTmp =='L':
#    nTmp -= 1
  
#  nAns[nTmp] += 1
  
print(*nAns)



Tmp = []
Tmp = input().rstrip().split(' ')

nA = int(Tmp[0])
nB = int(Tmp[1])
nC = int(Tmp[2])

nAns = nC - (nA-nB)

if nAns < 0:
  nAns = 0

print(nAns)


Verdicts: Runtime Error

Accepted