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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
import math

mod = 998244353

def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft

def S(x1, y1, x2, y2, x3, y3):
    return heron(math.sqrt((x1 - x2)**2 + (y1 - y2)**2), math.sqrt((x1 - x3)**2 + (y1 - y3)**2), math.sqrt((x3 - x2)**2 + (y3 - y2)**2))

def heron(a, b, c):
    try:
        d = (a + b + c) / 2
        return round(math.sqrt(d * (d - a) * (d - b) * (d - c)) * 2)
    except Exception as e:
        return 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=[]
for x in input().split(" "):
    a.append(int(x))

if a[1]+a[2]>a[0]:
    print(a[1]+a[2]-a[0])
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    A, B, C = map(int, input().split())

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def transfer(A: int, B: int, C: int)->int:
    return C - min(A-B, C)


if __name__ == "__main__":
    A, B, C = map(int, input().split())

    ans = transfer(A, B, C)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    import copy
    input = sys.stdin.readline
 
    a, b, c = [int(i) for i in input().split()]
    
    out = c - (a - b)
    
    if out < 0 :
        out = 0
        
    print(out)

        
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hoge = input().split()
A = int(hoge[0])
B = int(hoge[1])
C = int(hoge[2])

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
a,b,c=map(int,input().split())
if a-b>c:
    print(0)
else:
    print(c-a+b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, C: int):
    print(max(C - (A - B), 0))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def get_array(): return list(map(int , sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,b,c=get_ints()
if (a-b)>=c:
  print(0)
else:
  print(c-(a-b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]
ans = (B + C - A)
print(max(ans,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp = input().split()
a = int(inp[0])
b = int(inp[1])
c = int(inp[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    A, B, C = [int(c) for c in input().split()]
    if (A - B) < C:
        C -= (A - B)
    else:
        C = 0
    print(C)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B, C] = [int(input_raw[0]), int(input_raw[1]), int(input_raw[2])]
    print max(0, C - (A - B))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

temp = A - B
temp2 = C - temp

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
a, b, c = map(int, input().split())

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
from collections import deque
from functools import reduce
from operator import mul
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))
def COMBINATION(n, r):
    if n < 0 or r < 0 or n < r:
        return 0
    r = min(n-r, r)
    if r == 0:
        return 1
    o = reduce(mul, range(n, n - r, -1))
    u = reduce(mul, range(1, r + 1))
    return o // u
class UnionFind():

    def __init__(self, n):
        self.n = n
        self.node = [i for i in range(n)]
        self.size = [1 for _ in range(n)]

    def same(self, x, y):
        return bool(self.root(x) == self.root(y))

    def root(self, x):
        if self.node[x] == x:
            return x
        else:
            self.node[x] = self.root(self.node[x])  # 経路圧縮
            return self.node[x]

    def unite(self, x, y):
        x, y = self.root(x), self.root(y)
        if x == y:
            return  # 結合不要
        if self.size[x] < self.size[y]:
            x, y = y, x
        self.node[y] = x
        self.size[x] += self.size[y]

    def return_size(self, x):
        return self.size[self.root(x)]


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
     a,b,c=map(int,input().split())
     print(max(0,c-a+b))
     
if __name__ == '__main__':
     main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


def main():
    a, b, c = (int(z) for z in input().split())
    move = min(c, a - b)
    res = c - move
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""
 
import sys, math, random
import numpy as np
 
# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
 
 
 
def main():
    A, B, C = list(map(int,input().split()))
    sub=0
    if A>B:
        sub=A-B
    else:
        sub=0
    if sub>C:
        print("0")
    else:
        print(C-sub)
 
 
 
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin

A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

move = min(A-B, C)

print(C - move)

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

Solution code:
A,B,C = [int(x) for x in input().split()]
print(max(0,C-(A-B)))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    a, b, c = LI()
    rest = a - b
    if rest >= c:
        print(0)
    else:
        print(c-rest)

solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC136A - Transfer
def main():
    a, b, c = tuple(map(int, input().rstrip().split()))
    print(max(0, c - (a - b)))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    a, b, c = map(int, input().split())

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b , c = MAP()
d = (a-b)
# print(c-d)
if c-d <= 0:
    print(0)
else:
    print(c-d)
# print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC 136, A
a, b, c = [int(el) for el in input().split(' ')]
print(max(c-(a-b), 0 ))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(c-min(a-b, c))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

t = c - a + b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b, c = map(int, input().split())
print(max(0, c - a + b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

nokori = c - (a - b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())		# 5 7 2


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = (int(_) for _ in input().split())  

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf8

def read_int():
    return int(input())
 
 
def read_int_n():
    return list(map(int, input().split()))
 
 
def read_str():
    return input()
 
 
def read_str_n():
    return list(map(int, input().split()))

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces680B
gi = lambda : list(map(int,input().split()))
a, b, c = gi()
print(max(0, c - (a - b)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B, C):
    return max(0, C - (A - B))


def main():
    A, B, C = read_int_n()
    print(slv(A, B, C))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

fin = sys.stdin.readline
A, B, C = [int(elem) for elem in fin().split()]

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

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    A, B, C = map(int, input().split())
    return max(C - (A-B), 0)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

A, B, C = [int(item) for item in input().split()]
print(max(C - (A - B), 0))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def debug(*args):
    if 1 == 0:
        print(*args)

def solve(N, A):
    pass

def main():
    A, B, C = [int(x) for x in input().split()]
    print(max(0, C-(A-B)))

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

rest = a - b

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

Submission status: Accepted

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