Problem:


Score : 100 points

Problem Statement

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?

Constraints

All values in input are integers.

1 \leq B \leq A \leq 20

1 \leq C \leq 20

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the integer representing the amount of water, in milliliters, that will remain in Bottle 2.

Sample Input 1

6 4 3

Sample Output 1

1

We will transfer two milliliters of water from Bottle 2 to Bottle 1, and one milliliter of water will remain in Bottle 2.

Sample Input 2

8 3 9

Sample Output 2

4

Sample Input 3

12 3 7

Sample Output 3

0



Sample input:
6 4 3


Sample output:
1

Submission status: Runtime Error

Solution code:
A, B, C = map(int, raw_input().split())
if A - B > C:
  return 0
else:
  return C - (A - B)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, row_input().split())
if A - B > C:
  return 0
else:
  return C - (A - B)

Submission status: Runtime Error

Solution code:
n = int(input())
if(10 > n):
    print(n)
elif(n >= 10)and(n < 100):
    print(9)
elif(n >= 100)and(n < 1000):
    print(10 + (n - 100))
elif(n > 1000)and(n <10000):
    print(1000 + (n - 1000))
elif(n > 10000)and(n < 100000):
    print(10000 +((n - 10000))
else:
    print(90909)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = A - B

if C - S > 0:
    print(C - S)
else:
    print(0)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
if(c // (a - b) != 0):
  print(c % (a - b))
else:
  print(0)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print(c % (a - b))

Submission status: Runtime Error

Solution code:
list(a,b,c)=map(int,input().split())

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

Submission status: Runtime Error

Solution code:
list(a,b,c)=input().split()

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())
print(min(c-(a-b),0))

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())
print(min(c-(a-b),0)

Submission status: Runtime Error

Solution code:

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

else:
    print(c+b-a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=[int(i)for i in input().split()]
if c+b-a>0:
  print(c+b-a)
else:
  prnit("0")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
bottle1, water, bottle2 = map(int, input().split())
empty = bottle1 - water
if empty =< bottle2:
  print(bottle2 - empty)
else:
  print(0)

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(int, input().split()))
a = H[0]
for i in range(1,N-1):
    a = max(H[i], a)
    b = H[i+1]
    if a - b >= 2:
        print("No")
        break
print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
max_ = 0
pre = s[0]
ren = 1
for i in range(1, len(s)):
    if s[i] == pre:
        ren += 1
        max_ = max(max_, ren)
    else:
        ren = 1
        pre = s[i]
from collections import deque
status = deque([[1] * len(s)])
for i in range(max_):
    sta = [0] * len(s)
    if s[1] == 'L':
        sta[0] = status[i][1]
    else:
        sta[0] = 0
    if s[-2] == 'R':
        sta[-1] = status[i][-2]
    else:
        sta[-1] = 0
    a = [[1] * len(s)]
    for j in range(1, len(s) - 1):
        #print(sta)
        if s[j - 1] == 'R':
            sta[j] += status[i][j - 1]
        if s[j + 1] == 'L':
            sta[j] += status[i][j + 1]
    status.append(sta)
for i in range(1 + max_ - 2):
    status.popleft()
if (max_ - 2) % 2 == 0:
    print(' '.join([str(i) for i in status[1]]))
else:
    print(' '.join([str(i) for i in status[0]]))

Submission status: Runtime Error

Solution code:
A = list(map(int,input().split()))
print(A[2] - (A[1]-A[2])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())

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

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input())

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

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input())
print(B + C - A)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
 
if (A+B)%2 == 0:
    print( int((A+B)/2) )
else:
    print('IMPOSSIBLE')

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
mod = 10**9 + 7
from collections import deque

def main():
    ss = input()

    ln = len(S)
    result = [0 for i in range(ln)]

    S = []
    for i in ss:
        if i == "R":
            S.append(True)
        else:
            S.append(False)

    for ii in range(ln):
        target = ii
        if S[target]:
            while True:
                if S[target+1]:
                    target += 1
                else:
                    if ii % 2 == target % 2:
                        result[target] += 1
                    else:
                        result[target+1] += 1
                    break

        if not S[target]:
            while True:
                if not S[target-1]:
                    target -= 1
                else:
                    if ii % 2 == target % 2:
                        result[target] += 1
                    else:
                        result[target-1] += 1
                    break

    print(" ".join([str(i) for i in result]))


#####################################################ライブラリ集ここから

def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    while r-l > 1:
        x = (l+r)//2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        return r
    if side == "right":
        return l+1



def iip(listed):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n**0.5)+1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <=0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n-r+1, n+1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r+1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        #print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod-2)

def power(n, p):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p//2) ** 2) % mod
    if p % 2 == 1:
        return (n * power(n, p-1)) % mod


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
mod = 10**9 + 7
from collections import deque

def main():
    S = input()

    ln = len(S)
    result = [0 for i in range(ln)]
    S = [True if i == "R" else False for i in S]

    for ii in range(ln):
        target = ii
        if S[target]:
            while True:
                if S[target+1]:
                    target += 1
                else:
                    if ii % 2 == target % 2:
                        result[target] += 1
                    else:
                        result[target+1] += 1
                    break

        if not S[target]:
            while True:
                if not S[target-1]:
                    target -= 1
                else:
                    if ii % 2 == target % 2:
                        result[target] += 1
                    else:
                        result[target-1] += 1
                    break

    print(" ".join([str(i) for i in result]))


#####################################################ライブラリ集ここから

def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    while r-l > 1:
        x = (l+r)//2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        return r
    if side == "right":
        return l+1



def iip(listed):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n**0.5)+1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <=0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n-r+1, n+1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r+1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        #print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod-2)

def power(n, p):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p//2) ** 2) % mod
    if p % 2 == 1:
        return (n * power(n, p-1)) % mod


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def dp(i, j, s):
    for ii in range(i):
        if s[j] == "R":
            j = j +1
        else:
            j = j-1
    return j
  
s = list(input())
dic = {}
for x in range(len(s)):
    dic[x] = dp(10**1,x,s)
nwli =[0 for q in range(len(s))]
for t in range(len(s)):
    t2 = t
    for k in range(16):
        t2 = dic[t2]
    nwli[t2]+=1
print(" ".join(map(str,nwli)))
def dp(i, j, s):
    for ii in range(i):
        if s[j] == "R":
            j = j +1
        else:
            j = j-1
    return j
  
s = list(input())
dic = {}
for x in range(len(s)):
    dic[x] = dp(10**1,x,s)
nwli =[0 for q in range(len(s))]
for t in range(len(s)):
    t2 = t
    for k in range(16):
        t2 = dic[t2]
    nwli[t2]+=1
print(" ".join(map(str,nwli)))

Submission status: Runtime Error

Solution code:
s = list(input())
def dp(i, j, s):
    for ii in range(i):
        if s[j] == "R":
            j = j +1
        else:
            j = j-1
    return j
dic = {}
for x in range(len(s)):
    dic[x] = dp(10**3,x,s)
nwli =[0 for q in range(len(s))]
for t in range(len(s)):
    nwli[dic[dic[dic[dic[t]]]]]+=1
print(" ".join(map(str,nwli)))

Submission status: Runtime Error

Solution code:
 list(input())
def dp(i, j, s):
    for ii in range(i):
        if s[j] == "R":
            j = j +1
        else:
            j = j-1
    return j
dic = {}
for x in range(len(s)):
    dic[x] = dp(10**3,x,s)
nwli =[0 for q in range(len(s))]
for t in range(len(s)):
    nwli[dic[dic[dic[dic[t]]]]]]+=1
print(" ".join(map(str,nwli)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, C = map(int,input())
print(max(0, C-(A-B)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=0
for i in range(1,n+1):
    if i % 2 !=0:
        s += 1
print(s)

Submission status: Runtime Error

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

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

print(answer)

Submission status: Runtime Error

Solution code:
n=int(input())
h=list(map(int,input().split()))
h[0]=h[0]-1
for i in range(1,n):
    try:
        if h[i]-1>=h[i+1]:
            h[i]=h[i]-1
    except IndexError:
        pass
for i in range(n):
    try:
        if h[i]>h[i+1]:
                print("No")
                exit()
    except IndexError:
        pass
print("Yes")

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
x = C - A + B
if X < 0:
    X = 0
print(X)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
x = C - A + B
if X < 0:X = 0
print(X)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
x = C-A+B
if X < 0:
X = 0
print(X)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
x = C-A+B
print(X)
if X < 0
print(0)

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
x = C-A+B
print(X)
if X < 0
print(X)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input.split)
print(C-A+B)

Submission status: Runtime Error

Solution code:
A,B,C = map(int(),input().split())
print(C-A+B)

Submission status: Runtime Error

Solution code:
A,B,C=map(int(),input().split())
print(C-A+B)

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input(),split())
print(C-A+B)

Submission status: Runtime Error

Solution code:
A,B,C=map(int(),input(),split())
print(C-A+B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(C-(A-B))

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())

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

Submission status: Runtime Error

Solution code:
A,B,C=input()
print(C-A+B)

Submission status: Runtime Error

Solution code:
A,B,C=(int,input().split()))
print(C-A+B)

Submission status: Runtime Error

Solution code:
N = int(input())
lg = len(str(N))
cnt = 0
if lg == 6:
    cnt = 90909
elif lg == 5:
    cnt += N - 10000 + 1
    cnt += 909
elif lg == 4:
    cnt = 909
elif lg == 3:
    cnt += N - 100 + 1
    cnt += 9
elif lg == 2:
    cnt = 9
else:
    cnt = N
print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
i = 0
u = int(0)

for i in range(N):
    I = str(i+1)
    L=int(len(I))


    if L % 2 == 1:
        u = u + 1

print(u)

Submission status: Runtime Error

Solution code:
number = int(input())
ans = 0

for i in range(1,number+1):
  if len(str(i)) % 2 == 1:
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
number = int(input())
ans = 0

for i in range(1,number+1):
  if len(str(i)) % 2 != 1:
    ans += 1

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b, c = input()

cnt = c - a + b

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

Submission status: Runtime Error

Solution code:
a,b,c = list(map(lambda int: input().split(' '))
print(c-a+b)

Submission status: Runtime Error

Solution code:
A,B,C=int(input())
return(C-(A-B))

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

print(C-(A-B))

Submission status: Runtime Error

Solution code:
A=int(input("A:"))
B=int(input("B:"))
C=int(input("C:"))

print(C-(A-B))

Submission status: Runtime Error

Solution code:
A=int(input("A:"))
B=int(input("B:"))
C=int(input("C:"))

print(C-(A-B))

Submission status: Runtime Error

Solution code:
A=int(input("A:"))
B=int(input("B:"))
C=int(input("C:"))

return(C-A+B)

Submission status: Runtime Error

Solution code:
A=int(input("A"))
B=int(input("B"))
C=int(input("C"))

return(C-(A-B))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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))
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))
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))
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))
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))

Submission status: Runtime Error

Solution code:
def main():
	# n,m = map(int,input().split())
	# n,k = map(int,input().split())
	# n = int(input())
	# a = list(map(int,input().split()))
	# rsp = list(str(input()))
	# l = [list(map(int, input().split())) for _ in range(n)]
	# s = list(s)
	
	a,b,c = map(int,input().split())
 	ans = c-a+b
	if ans < 0:
		print(0)
	else:
		print(ans)

 
if __name__ == '__main__':
	main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 from sys import stdin

a,b,c = [int(x) for x in stdin.readline().rstrip().split()]

print(b+c-a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
if N < 10 :
	print(N)
elif N < 100 :
	print(9)
elif N < 1000 :
	print(9 + (N - 100 + 1))
elif N < 10000 :
	print(9 + 900)
elif N < 100000 :
	print(9 + 900 + (N - 10000 + 1))
else :
	print(9 + 900 + 90000)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
ln=map(int,input().split())
if ln[0]-ln[1]>ln[2]:
    print("{}".format(ln[1]+ln[2]-ln[0]))
else:
print("0")

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cmath>

using namespace std;

int main() {

    int a, b, c;
    cin >> a >> b >> c;

    int d = c - (a - b);

    if (d < 0) {
        d = 0;
    }

    cout << d << '\n';

}

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
i = 0
a.append(1000000000);
while (i < n):
    if (a[i+1] < a[i]):
        a[i] -= 1
    i += 1
j = 0
falsecount = 0
while (j < n-1):
    if (a[j] > a[j+1]):
        falsecount += 1
    j += 1
if (falsecount == 0):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))
ans = True
for i in range(N-2,-1,-1):
    if h[i] > h[i+1]:
        h[i]-=1
for i in range(N-1):
    if h[i] <= h[i+1]:
        ans = True
    else:
        ans = False
        break
if ans:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))
ans = True
for i in range(N-1):
    if h[i] >= h[i+1]:
        h[i]-=1
for i in range(N-1):
    if h[i] <= h[i+1]:
        ans = True
    else:
        ans = False
        break
if ans:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))
flag = True

for i in range(N-1):
    if h[i] > h[i+1]:
        h[i] -= 1
for i in range(N-1):
    if h[i] > h[i+1]:
        print('No')
        return
print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))
if N==1:
  print('Yes')

Submission status: Runtime Error

Solution code:
if int(input()) == 1:
  print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))

for i in range(N):
    if a[i]>=a:
        a=max(a,h[i]-1)
    else:
        print("No")
        exit
print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))

for i in range(N):
    if a[i]>=a:
        a=max(a,h[i]-1)
    else:
        print("No")
        exit
print("Yes)

Submission status: Runtime Error

Solution code:
N = int(input())
h = list(map(int,input().split()))
flag = 0
for i in range(N-1):
    if h[i] > h[i+1]:
        h[i] -= 1
    else:
        continue

for i in range(N-1):
    if h[i]<= h[i+1]:
        flag = 1
    else:
        flag=0
        break

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"
#define MAX_0(N) ((N>0)?N:0)
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

int main(int argc, char const *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int A,B,C;
    cin >> A >> B >> C;

    cout << MAX_0(C - (A - B)) << endl;
    
    return 0;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0

#Pythonのfor文range()の右側<最大値>は書いている値から-1されるものなので、注意する。(+1する)

for i in range(1, N + 1):

    if len(str(i)) % 2 == 1:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
h = [int(x) for x in input().split()]
h.reverse()
 
flag = True
 
for i in range(1, n):
    if h[i - 1] >= h[i]:
        continue
    elif h[i] == h[i - 1] + 1:
        h[i] -= 1
    else:
        flag = False
        break
 
print('Yes') if flag else print('No')

Submission status: Runtime Error

Solution code:
n = raw_input()
arr = map(int, raw_input().split())

no_flag = False
length = len(arr)
tmp = arr
print(length)

if length > 1:
    for j in range(0, length-1):
        if arr[j+1] < arr[j]:
            tmp[j+1] = tmp[j+1]-1
        print(tmp)
        if tmp[j+1] < tmp[j]:
            no_flag = True
            break
    if no_flag == False:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input())
print(C-(A-B))

Submission status: Runtime Error

Solution code:
answer = C-(A-B)
if answer<0:
  answer=0
print(int(answer))

Submission status: Runtime Error

Solution code:
  answer = C-(A-B)
  if answer<0:
    answer=0
  print(int(answer))

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().solit())
capacity = a - b
answer = c - capacity
if answer < 0:
  answer = 0
print(answer)

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().solit())
answer = c - (a- b)
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys

input = sys.stdin.readline
n = int(input())
nums = list(map(int, input().split()))
maxnum = 0

for x in range(n):
    if maxnum < nums[x]:
        maxnum = nums[x]
    if maxnum - nums[x] > 1:
        print('No')
        sys.exit() 

print('Yes')

Submission status: Runtime Error

Solution code:
import sys
 
n = int(input())
nums = list(map(int, input().split()))
 
for x in range(n-1):
    if nums[x] - nums[x+1] > 1:
        print('No')
        sys.exit() 
 
print('Yes')

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(int, input().split()))
f=0

for i in range(N-1, 1, -1):
    if H[i]-H[i-1] ==-1:
        H[i-1]-=1
    elif H[i]-H[i-1]>=0:
        continue
    else:
        f+=1
if f==0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
i = list(map(int, input().split()))
print(i[2] - (i[0] - i[1]))
i = list(map(int, input().split()))
n = i[2] - (i[0] - i[1])
if n > 0:
    print(n)
else:
    print(0)

Submission status: Runtime Error

Solution code:
A, B, C = [int(x) for x in input()]

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

Submission status: Runtime Error

Solution code:
A,B,C=(int,input().split())
D=C-(A-B)
if D<=0:
   print(0)
else:
   print(D)

Submission status: Runtime Error

Solution code:
A,B,C=(int,input().split())
D=C-(A-B)
if D<=0
   print(0)
else:
   print(D)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
h = list(map(int, input().split()))
for i in range(n-1):
    if h[i+1] == h[i] - 1:
        h[i] = h[i] - 1
if h[n-1] == h[n-2] + 1:
    h[n-1] = h[n-1] - 1
flag = True
for i in range(n-1):
    if h[i+1] < h[i]:
        flag = False
        break
if flag == True:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A,B,C = intput().split()
A,B,C = int(A),int(B),int(C)

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

Submission status: Runtime Error

Solution code:
A,B,C = intput().split()
A,B,C = int(A),int(B),int(C)

print(C-(A-B))