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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os
sys.setrecursionlimit(10**7)
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 [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 _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('- {} -> {}'.format(name, val), file=sys.stderr)
            return None

def main():
    return


if __name__ == '__main__':
    if 'LOCAL' in os.environ:
        # ローカル実行時のみ通る処理
        # テストしたい入力を入れておく
        input_values = [
                """
                """.strip(),
                """
                """.strip()
                ]
        for input_value in input_values:
            input_value = input_value.split('\n')
            #  N = int(input_value[0])
            #  A = list(map(int, input_value[1].split()))
            ans = main()
            expected_value = int(input_value[2])
            assert ans == expected_value, 'failed: ans: {ans}, exp: {exp}'.format(ans=ans, exp=expected_value)
    else:
        A, B, C = LI()
        ans = C- (A-B)
        if ans < 0:
            ans = 0
        print(ans)
        #  print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    a, b, c = read()
    result = think(a, b, c)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b, c):
    if b + c >= a:
        return b + c - a
    else:
        return 0


def write(result):
    print(result)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# A

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC136a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

tmp = A -B
C -= tmp

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

Submission status: Accepted

Solution code:
a, b, c = [int(item) for item 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:
    ans = 0
else:
    ans = c - a + b
print(ans)

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

Submission status: Accepted

Solution code:
A,B,C = 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(B + C - A,0)
print(ans)

Submission status: Accepted

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

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

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

else:
  print(b+c-a)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-



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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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())
limit = A - B
if limit >= C:
  print(0)
else:
  print(C - limit)

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A,B,C] = string_to_int(inputs[0])
    cap = A - B
    return C - cap if C - cap >= 0 else 0



def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A,B,C=MAP()

print(max(0, 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:
import sys
input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

remain = A - B

remain_2 = C - remain

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

Submission status: Accepted

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

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:
"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    A, B, C = map(int, sys.stdin.readline().split())
    print(max(0, C -(A - B)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().strip().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(B+C-min(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:
#N = int(input())
A, B, C = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
D = A - B
C = C - D
if C < 0 :
    print(0)
else :
    print(C)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys

sys.setrecursionlimit(100000)

MIN = -10 ** 9
MAX = 10 ** 9 + 7


def main():
    # N = int(input())
    a, b, c = [int(a) for a in input().split()]
    # # A = [
    # #     int(input())
    # #     for _ in range(N)
    # # ]
    # A = [int(a) for a in input().split()]

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, C = list(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())

ans = c-(a-b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

A, B, C = LI()

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

Submission status: Accepted

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

C -= A-B
if C < 0:
    C = 0

print(C)

Submission status: Accepted

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

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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    a, b, c = rli()
    print(max(0, c-(a-b)))


if __name__ == '__main__':
    main()

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 solve(A: int, B: int, C: int):
    if A - B < C:
        return C - (A - B)
    else:
        return 0


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
    ans = solve(A, B, C)
    if ans is not None:
        print(ans)


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())
print(max(C+B-A,0))

Submission status: Accepted

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

aki = A - B

print(max(0, C - aki))

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

t = A - B
ans = C - t

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(C - min(C, (A - B)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    """ convenient functions
    # for i, a in enumerate(iterable)
    # q, mod = divmod(a, b)
    # divmod(x, y) returns the tuple (x//y, x%y)
    # Higher-order function: reduce(operator.mul, xyz_count, 1)
    # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
    """

    """convenient decorator
    # @functools.lru_cache():
    # to facilitate use of recursive function
        # ex:
        # from functools import lru_cache
        # import sys
        # sys.setrecursionlimit(10**9)
        # @lru_cache(maxsize=None)
        # def fib(n):
        #     if n < 2:
        #         return n
        #     return fib(n-1) + fib(n-2)
        # print(fib(1000))
    """
    
    # import numpy as np
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product # https://docs.python.org/ja/3/library/itertools.html
    # accumulate() returns iterator! to get list: list(accumulate())
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  # prime factor
        b, e = 2, 0  # base, exponent
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        # TODO: How should I do when n - r is negative?
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict # https://docs.python.org/ja/3/library/collections.html#collections.deque
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
    from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
    import operator
    from operator import itemgetter #sort 
    # ex1: List.sort(key=itemgetter(1))
    # ex2: sorted(tuples, key=itemgetter(1,2))
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd # Deprecated since version 3.5: Use math.gcd() instead.
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    # first create factorial_list
    # fac_list = mod_factorial_list(n)
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
    def modinv(a, p = MOD):
        # evaluate reciprocal using Fermat's little theorem:
        # a**(p-1) is identical to 1 (mod p) when a and p is coprime
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        # fac_list = modfactorial_list(100)
        # print(modcomb(100, 5, modfactorial_list(100)))
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    """ initialize variables and set inputs
    # initialize variables
        # to initialize list, use [0] * n
        # to initialize two dimentional array, use [[0] * N for _ in range(N)]
    # set inputs
        # put inputs between specific values (almost as quickly)
        # ex) S = [-INF] + [int(r()) for _ in range(A)] + [INF]
        # open(0).read() is sometimes useful:
        # ex) n, m, *x = map(int, open(0).read().split())
        #     min(x[::2]) - max(x[1::2])
        # ex2) *x, = map(int, open(0).read().split())
        #     don't forget to add comma after *x if only one variable is used
    # preprocessing
        # transpose = [x for x in zip(*data)]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
        # flat = [flatten for inner in data for flatten in inner]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [1, 2, 3, 4, 5, 6, 7, 8, 9]
    # calculate and output
        # output pattern
        # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6
    """

    # functions used
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    # single int: int(r())
    # single string: r()
    # single float: float(r())
    # line int: R()
    # line string: r().split()
    # line (str, int, int): [j if i == 0 else int(j) for i, j in enumerate(r().split())]
    # lines int: [R() for _ in range(n)]
    """

    if __name__ != '__main__':
        # for test
        sys.stdin = open('sample.txt')
        
    # ----------------------------------
    # main

    A, B, C = R()
    print(max(C - (A - B), 0))
    
    
    # end of main
    # ----------------------------------

    """memo: how to use defaultdict of list
    # initialize
    Dic = defaultdict(list)
    # append / extend
    Dic[x].append(y)
    # three methods for loop: keys(), values(), items()
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    # to make binary digits text
    >>> a = 5
    >>> bin_str_a = format(a, '#06b')
    >>> print(bin_str_a)
    0b0101 # first 2 strings (='0b') indicates it is binary
    """
    
    """memo: how to solve the problem
    creating simple test/answer
    greed
    simple dp
    graph
    """

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 = [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())
hoge = min(A,B+C)
print(B+C-hoge)

Submission status: Accepted

Solution code:
A, B, C = list(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()))

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

Submission status: Accepted

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

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7

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

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

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
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())
r = max(0, C-(A-B))
print(r)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

if __name__ == "__main__":
    resolve()

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

Submission status: Accepted

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


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

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


if __name__ == '__main__':
  main()

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 = [int(x) for x in raw_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())

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

Submission status: Accepted

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

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