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: Wrong Answer

Solution code:
x=input().split()

y=[0]*3

for i in range(3):
  y[i]=int(x[i])
  
ans=(y[2]-(y[0]-y[1]))

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

Submission status: Wrong Answer

Solution code:
x=input().split()

for i in range(3):
  x[i]=int(x[i])
  
print(x[2]-(x[1]-x[1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b, c = map(int, input())
    return c - a + b

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

str = "37"
# str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Submission status: Wrong Answer

Solution code:
import sys

input_str = input().split(" ")
a = int(input_str[0])
b = int(input_str[1])
c = int(input_str[2])
print(c-a+b)

Submission status: Wrong Answer

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

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

A = input[0]
B = input[1]
C = input[2]



D = A - B
E = C - D

if A < B:
    E = C

print(E)

Submission status: Wrong Answer

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

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

A = input[0]
B = input[1]
C = input[2]


D = A - B
E = C - D

print(E)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
def water(A,B,C):
        if A-B>=C:
                return 0
        else:
                return C-A+B

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def water(A,B,C):
        if A-B>=C:
                return 0
        else:
                return C-A+B

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

# output
print(c-a+b)

Submission status: Wrong Answer

Solution code:
def remain(A,B,C):
  remain=0
  if (A-B)>C:
    remain=0
  else:
    remain=C-(A-B)
  return remain

Submission status: Wrong Answer

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

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

ans = c - (a - b)
# 出力
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
#各Lについて、自分より左でもっとも右のR
n_r = [-1 for i in range(n)]
#各Rについて、自分より右でもっとも左のL
n_l = [-1 for i in range(n)]

nearest_r = 0

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

nearest_l = n-1

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

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

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
ABC=input().split()
spaceA=int(ABC[0])-int(ABC[1])
lessB=int(ABC[2])-spaceA
print(lessB)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c - a + b)

Submission status: Wrong Answer

Solution code:
IN = input()
A, B, C = [int(x) for x in IN.split(" ")]
total = 0
try:
    total = B + min((A-B), C)
    print(total)
except:
    print("ERROR")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_abc = [int(i) for i in input().split()]
a = _abc[0]
b = _abc[1]
c = _abc[2]

print(c-(a-b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

D=A-B
E=C-D

print(E)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
x[0] = -1*x[0]
sum(x)

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
## i[0] = A,i[1]= B, i[2]=C
print(i[2]-i[0]+i[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

D = A-B
if D>C:
    E = 0
else:
    E = C-D
E

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
1<=B<=A<=20
1<=C<=20
D = A-B
if D>C:
    E = C-C
else:
    E = D-C

E

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

N = input()

A = int(N.split()[0])
B = int(N.split()[1])
C = int(N.split()[2]) 



print(C-A+B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def transfer(A, B, C):
    return (B + C - A) if (B + C) > A else 0

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
# 文字列の入力
# 出力
print("{}".format(c-(a-b) if c-(a-b) < 0 else 0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
# 出力
print("{}".format(c-(a-b)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
a, b, c = map(int, input().split())
rest = a - b
if c - rest > 0:
  print(0)
else:
  print (c - a + b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc136/tasks/abc136_a

A,B,C=(int(x) for x in input().split())
i=0

if 1<=B<=A<=20 and 1<=C<=20:
    i=C-(A-B)
elif i<0:
    i=0
else:
    print('condition failed')

print(i)

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc136/tasks/abc136_a

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

if 1<=B<=A<=20 and 1<=C<=20:
    i=C-(A-B)
elif i<0:
    i=0
else:
    print('condition failed')

print(i)

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc136/tasks/abc136_a

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

if 1<=B<=A<=20 and 1<=C<=20:
    i=C-(A-B)
else:
    print('condition failed')

print(i)

Submission status: Wrong Answer

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

if 1<=B<=A<=20 and 1<=C<=20:
    i=C-(A-B)
else:
    print('condition failed')

print('C have',i)

Submission status: Wrong Answer

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

print(a)

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

Submission status: Wrong Answer

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

print(A)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- encoding : UTF-8 -*-

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

print(d)

Submission status: Wrong Answer

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

print(c-a+b)

Submission status: Wrong Answer

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

output=C-(A-B)
print(output)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def solve():
    A,B,C = list(map(int, input().split()))
    print(C-(A-B))

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C=(int(x) for x in input().split())
1<=B<=A<=20
1<=C<=20
x=C-A+B
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

r = c - (a-b)

print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = c-min(a-b,c)

Submission status: Wrong Answer

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

print("{}".format(c-a+b))

Submission status: Wrong Answer

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

print("{}-{}+{}".format(c,a,b))

Submission status: Wrong Answer

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

print(b2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

margin = a - b

result = 0

if margin > 0 and c - margin > 0:
  result = c - margin  
  
print(result)

Submission status: Wrong Answer

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

D = C - ( A - B )

print(D)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import copy
S = input()
Slen = len(S)

Sc=[0]*Slen
for i in range(Slen):
    if S[i:i+2] == 'RL':
        for j in range(i,-1,-1):
            if S[j]=='R':
                Sc[(i-j)%2 + i] += 1
            else:
                break
        for j in range(i+1,Slen):
            if S[j] == 'L':
                Sc[(j-i)%2 +i] += 1
            else:
                break    

print(" ".join(map(str,Sc)))

Submission status: Wrong Answer

Solution code:
import copy
S = input()

Sr = S.split('L')
R_max = len(max(Sr,key=len))
Sl = S.split('R')
L_max = len(max(Sl,key=len))

Sc = [1] * len(S)
Sc_ = [0] * len(S)

S_try = max(L_max,R_max)
if S_try % 2 == 1:
    S_try += 1

for n in range(S_try):
    for i in range(len(S)):
        if S[i] == 'L':
            Sc_[i - 1] += Sc[i]
        elif S[i] == 'R':
            Sc_[i + 1] += Sc[i]
    Sc = copy.deepcopy(Sc_)
    Sc_ = [0] * len(S)

print(" ".join(map(str,Sc)))

Submission status: Wrong Answer

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

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from heapq import heappush, heappop
from collections import deque
import itertools
from itertools import permutations
import sys
import bisect
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
GYN=['Yes','trumpet']
mo=10**9+7
imp='IMPOSSIBLE'

a,b,c=MI()
print(c-a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
# 出力
print("{}".format(c-a+b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(min(C,A-B))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c - a +b)

Submission status: Wrong Answer

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

print(a)
print(b)
print(c)
 
amari = (int(a) - int(b))

if amari > int(c):
  result = 0
else:
  print(int(c) - amari)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""
- https://atcoder.jp/contests/abc136/tasks/abc136_a
- 容器１：now B, max A
- 容器２：now C
- reg:
    - 1≤B≤A≤20
    - 1≤C≤20
"""

a, b, c = map(int, input().split())
print(a)
cap = a-b
use = min(a-b, c)
ans = c - use
print(ans)

Submission status: Wrong Answer

Solution code:
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

a,b,c = ai()
print(c-a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans=C-(A-B)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_data = input().rstrip().split(' ')
A = int(input_data[0])
B = int(input_data[1])
C = int(input_data[2])
print(C + (B - A))

Submission status: Wrong Answer

Solution code:
input_data = input().rstrip().split(' ')
A = int(input_data[0])
B = int(input_data[1])
C = int(input_data[2])
print(C - (B - A))

Submission status: Wrong Answer

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

if a == b:
  print(c)

space = a - b

if space >= c:
  print(0)
else:
  print(c - space)

Submission status: Wrong Answer

Solution code:
p=input().rstrip().split(' ')
A=int(p[0])-int(p[1])
if A<=0:
    print(0)
else:
    if int(p[2])<=A:
        print(0)
    else:
        print(int(p[2])-A)

Submission status: Wrong Answer

Solution code:
a, b, c = [int(x) for x in input().split()]
print(c - (a - b))

Submission status: Wrong Answer

Solution code:
p=input().rstrip().split(' ')
A=int(p[0])-int(p[1])
if A<=0:
    print(0)
else:
    if (int(p[2]) - A) <= 0:
        print(0)
    else:
        print(int(p[2])-A)

Submission status: Wrong Answer

Solution code:
a, b, c = [int(x) for x in input().split()]
print(c - a + b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = min(0, c-(a-b))

print(ans)

Submission status: Wrong Answer

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

ans = min(0, c-abs(a-b))

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
S = list(S)
Children = [0]*N

RL = []
LR = []
for i in range(N-1):
    if S[i] == 'R' and S[i+1] == 'L':
        RL.append(i+1)
    elif S[i] == 'L' and S[i+1] == 'R':
        LR.append(i+1)
LR.append(N)

Change = sorted(RL+LR)

Child = [LR[0]]
for i in range(1,len(LR)):
    Child.append(LR[i]-LR[i-1])

dig = [0]*len(Change)
dig[0] = Change[0]
for i in range(1,len(Change)):
    dig[i] = Change[i] - Change[i-1]

Rtype = [0]*len(RL)
for i in range(len(RL)):
    if Child[i] % 2 == 0:
        Rtype[i] = 0
    else:
        if dig[2*i]%2==0:
            Rtype[i] = 1
        if dig[2*i+1]%2==0:
            Rtype[i] = -1

k=0
for i in range(N):
    if i+1 in RL: #Rの方
        if Rtype[k] == -1:
            Children[i] += Child[k]//2 + 1
        else:
            Children[i] += Child[k]//2
    if i in RL: #Lの方
        if Rtype[k] == 1:
            Children[i] += Child[k]//2 + 1
        else:
            Children[i] += Child[k]//2
        k += 1

print(*Children)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
f = lambda : raw_input().rstrip()
f1 = lambda : f().split()
f2 = lambda t : map(t, f1())

def main1():
    A, B, C = f2(int)
    print 0 if B + C <= A else (B + C) % A

def main2():
    n = int(f())
    p = 0
    ans = -1
    while 10**p<n:
        if 10**(p+1) > n:
            ans = ans + n - 10**p + 1
        else:
            ans = ans + 10**(p+1) - 10**p + 1
        p = p + 2
    print ans
    
def main3():
    n = int(f())
    a = f2(int)
    m = 0
    for i in xrange(1,n):
        if a[i] < a[i-1]:
            m = m + 1#(a[i-1] - a[i])
  
    print "Yes" if m < 2 else "No"

def main4():
    s = f()
    n = len(s)
    ans = [0]*n
    m = 1
    i = 1
    st = 0
    s = s + ("L" if s[-1]=="R" else "R")
    while i <= n:
        if s[i] != s[i-1]:
            #print i, st,
            j = st if s[i-1]=="L" else i
            #print j
            if m&1:
                ans[j-1] = ans[j-1] + m/2 + (1 if s[i-1] == "R" else 0) 
                ans[j] = ans[j] + m/2 + (1 if s[i-1] == "L" else 0)
            else:
                ans[j-1] =  ans[j-1] + m/2
                ans[j] = ans[j] + m/2
            m = 0
            st = i
        #print ans
        i = i + 1
        m = m + 1
    print " ".join(map(str,ans)) 
         
if __name__=="__main__":
    main1()

Submission status: Wrong Answer

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

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
pot=[0 for _ in range(len(s))]
cur='R'
count=0
for i in range(len(s)):
  if cur==s[i]:
    count+=1
  else:
    
    if cur=='R':
      pot[i]=count
    count=1
    cur=s[i]
count=0
for i in range(len(s)-1,-1,-1):
  if cur==s[i]:
    count+=1
  else:
    if cur=='L':
      pot[i]=count
    count=1
    cur=s[i]
  
print(pot, sep=' ', end='')

Submission status: Wrong Answer

Solution code:
S = list(input())
n = len(S)
H = []

# 初期状態Hを作る
for i in range(0,n):
  H.append(1)

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

print(H)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
DP=dict()

def func(l,r):
  rev=False
  cha=l-r
  counts=0
  if r>l:
    rev=True
    cha=r-l
    l,r=r,l
  common=r-1
  l-=common
  r-=common
  if l in DP:
  	l,r,counts=DP[l]
  else:
  	if (l+r)%2==0:
  	  l=(l+r)//2
  	  r=l
  	else:
  	  l=(l+r+1)//2
  	  r=l-1
  	  counts+=1
  	  DP[l]=(l,r,counts)
  counts+=common
  if counts%2==1:
  	l,r=r,l
  if not rev:
  	return '0 '*common+str(r+common)+' '+str(l+common)+' '+'0 '*common+'0 '*cha
  else:
  	return '0 '*cha+'0 '*common+str(l+common)+' '+str(r+common)+' '+'0 '*common

S=input()
ans=''
l=0
r=0
bef='R'
for i in S:
  if bef=='L' and i=='R':
    #print(l,r,None,func(l,r))
    ans+=func(l,r)
    l=0
    r=0
  if i=='L':
    l+=1
  if i=='R':
    r+=1
  bef=i

#print(l,r,None,func(l,r))
ans+=func(l,r)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import  math
s=list(input())

i=0
a=0
r=0
l=0
ans=[0]*len(s)
swc=0
while i!=len(s):
    try:
        if s[i]=="R":
            a+=1
            r+=1
        if s[i]=="L":
            swc=1
            a+=1
            l+=1
        if s[i]=="L" and s[i-1]=="R":
            Rend=i-1
            Lsrt=i
        if swc==1 and s[i+1]=="R":
            if (a%2)==0:
                ans[Rend]=int(a/2)
                ans[Lsrt]=int(a/2)
            else:

                if max([Rend, Lsrt]) % 2 == 0:
                    if r > l:
                        ans[Rend] = math.floor(a / 2)
                        ans[Lsrt] = math.ceil(a / 2)

                    else:
                        ans[Rend] = math.ceil(a / 2)
                        ans[Lsrt] = math.floor(a / 2)

                else:
                    if r > l:
                        ans[Rend] = math.ceil(a / 2)
                        ans[Lsrt] = math.floor(a / 2)

                    else:
                        ans[Rend] = math.floor(a / 2)
                        ans[Lsrt] = math.ceil(a / 2)



            a=0
            r=0
            l=0
            swc=0
        i+=1
    except:
        if (a % 2) == 0:
            ans[Rend] = int(a / 2)
            ans[Lsrt] = int(a / 2)
        else:

            if max([Rend, Lsrt]) % 2 == 0:
                if r > l:
                    ans[Rend] = math.floor(a / 2)
                    ans[Lsrt] = math.ceil(a / 2)

                else:
                    ans[Rend] = math.ceil(a / 2)
                    ans[Lsrt] = math.floor(a / 2)

            else:
                if r > l:
                    ans[Rend] = math.ceil(a / 2)
                    ans[Lsrt] = math.floor(a / 2)

                else:

                    ans[Rend] = math.floor(a / 2)
                    ans[Lsrt] = math.ceil(a / 2)
        break
print(" ".join(map(str,ans)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
l=[0 for x in range(len(list(S)))]
for i in range(len(list(S))):
    p_i=i
    p_l=[]
    for j in range(10**6):
        if S[p_i]=="R":
            p_i+=1
        elif S[p_i]=="L":
            p_i-=1
    l[p_i]+=1

print(*l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = input().split()

a = int(i[0])
b = int(i[1])
c = int(i[2])

t = c - (a - b)

print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c = [ int(str) for str in input().split()]
anser = c - (a - b)
print(anser)

Submission status: Wrong Answer

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

print(C - (A - B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a-b >= c-b:
    cup2 = 0

else:
    cup1 = abs(a - b) 
    cup2 = c - cup1

print(cup2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def Transfer(a,b,c):
    d=b
    for i in range(b):
        d+=1
        c-=1
        if d==a:
            print(c)
            return(c)
    print(0)
    return 0

Submission status: Wrong Answer

Solution code:
W = input().split()

A = int(W[0])
B = int(W[1])
C = int(W[2])

print(C - (A - B))

Submission status: Wrong Answer

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