Problem:


Score : 200 points

Problem Statement

Takahashi has A cookies, and Aoki has B cookies.
Takahashi will do the following action K times:

If Takahashi has one or more cookies, eat one of his cookies.

Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.

If they both have no cookies, do nothing.

In the end, how many cookies will Takahashi and Aoki have, respectively?

Constraints

0 \leq A \leq 10^{12}

0 \leq B \leq 10^{12}

0 \leq K \leq 10^{12}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

Print the numbers of Takahashi's and Aoki's cookies after K actions.

Sample Input 1

2 3 3

Sample Output 1

0 2

Takahashi will do the following:

He has two cookies, so he eats one of them.

Now he has one cookie left, and he eats it.

Now he has no cookies left, but Aoki has three, so Takahashi eats one of them.

Thus, in the end, Takahashi will have 0 cookies, and Aoki will have 2.

Sample Input 2

500000000000 500000000000 1000000000000

Sample Output 2

0 0

Watch out for overflows.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Accepted

Solution code:
def main():
    A, B, K = map(int, input().split())

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

    print(A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
t, a, times = [ int(i) for i in input().split(" ")]
 
a_count = times - t
if t == 0 and a == 0:
  print(0, 0)
elif a_count <= 0:
  print(t-times, a)
else:
  if a_count > a:
    print(0, 0)
  else:
    print(0, a-a_count)

Submission status: Accepted

Solution code:
def f(x, k):
    delt = min(x, k)
    return x - delt, k - delt


A, B, K = map(int, input().split())
A, K = f(A, K)
B, K = f(B, K)
print(A, B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])
K = int(strings[2])

if A >= K:
    print('{0} {1}'.format(A - K, B))
    
elif A + B > K:
    temp = K - A
    print('0 {0}'.format(B + A - K))
    
else:
    print('0 0')

Submission status: Accepted

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

a = min(A, K)
A -= a
K -= a

b = min(B, K)
B -= b

print(A, B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,k=input().split()
aa=int(a)
bb=int(b)
kk=int(k)
res=(aa+bb)-kk
if res<=0:
    print(0,'',0)
elif aa>kk:
    print(aa-kk,'',bb)
elif aa<=kk:
    print(0,'',res)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if K >= A:
    K1 = K - A
    A = 0
    if K1 >= B:
        B = 0
    else:
        B = B - K1
else:
    A = A - K

print(A, B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, k = map(int, input().split())
if n + m < k:
    print(0, 0)
elif k > n:
    print(0, n+m-k)
else:
    print(n-k, m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    a, b, k = LI()
    A = max(0, a - k)
    k = k - (a - A)
    B = max(0, b - k)
    print(A,B)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

K1 = K - A

if K >= A:
    A = 0
else:
    A = A - K

if K1 > 0:
    if B >= K1:
        B = B - K1
    else:
        B = 0
        

print("{} {}".format(A, B))

Submission status: Accepted

Solution code:
import sys
A, B, K = map(int, input().split())

if K < A:
    print(A - K, B)
    sys.exit()

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

Submission status: Accepted

Solution code:
A, B, K = map(int, input().split(' '))
# A,B,K = 10**12,10**12,10**12

# print(A,B,K)

def main(a, b, k):
    if a == 0 and b == 0:
        print(0, 0)

    elif k <= a:
        print(a - k, b)

    elif k >= a + b:
        print(0, 0)

    elif a < k < a + b:
        print(0, b - (k-a))


main(A, B, K)

Submission status: Accepted

Solution code:
a, b, k = [int(_) for _ in input().split()]
if a >= k:
    print(a - k, b)
elif a < k <= a + b:
    print(0, a + b - k)
else:
    print(0, 0)

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
a=n[0]
b=n[1]
k=n[2]
if(a<=k):
    k=k-a
    a=0
    if(b<=k):
        b=0
    else:
        b=b-k
else:
    a=a-k
print('{0} {1}'.format(a,b))

Submission status: Accepted

Solution code:
from sys import stdin

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

if A <= K:
    K_ = K-A
    A = 0
    if B <= K_:
        print("0 0")
    else:
        print("0 {}".format(B-K_))

else:
    print("{} {}".format(A-K, B))

Submission status: Accepted

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

if A >= K:
    A = A - K
elif A < K:
    B = B - K + A
    A = 0
    if B < 0:
        B = 0
print(A,B)

Submission status: Accepted

Solution code:
A,B,K = list(map(int,input().split()))
x=0
y=0
if A-K >0:
    x = A-K
    y = B
else:
    if B-(K-A) > 0:
        y = B-(K-A)

print(str(x) + " " + str(y))

Submission status: Accepted

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


def solve(A: int, B: int, K: int):
    if A + B <= K:
        print(0, 0)
        return

    a = A - K
    if a < 0:
        ans_b = B + a
    else:
        ans_b = B
    print(max(a, 0), ans_b)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0
if k <= a:
  a -= k
else:
  b = max(0, b - (k - a))
  a = 0
  
print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

if a>=k:
	a=a-k
else:
	k=k-a
	a=0
	if b>=k:
		b=b-k
	else:
		b=0

print(int(a),int(b))

Submission status: Accepted

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

# print(a)
# print(b)
# print(k)

if (a + b) <= k:
    a = 0
    b = 0
elif a <= k:
    b = b - (k - a)
    a = 0
else:
    a = a - k
    b = b
    
print("{} {}".format(a, b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

def resolve():
    A, B, K = map(int, input().rstrip().split())

    if K < A:
        print(A-K, B)
    elif K < A + B:
        print(0, A + B -K)
    else:
        print(0, 0)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
A, B, K = map(int, input().split())
if A == 0 and B == 0:
    A = 0
    B = 0
elif K > A:
    mod = K - A
    A = 0
    B -= mod
else:
    A -= K

if B < 0:
    B = 0
print(A, B)

Submission status: Accepted

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

if a+b <= k:
    a = b = 0
else:
    if a > k:
        a -= k
    else:
        b -= k-a
        a = 0
        
print(a,b)

Submission status: Accepted

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

print(A, B)

Submission status: Accepted

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

Submission status: Accepted

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

def print_ans(A, B, K):
    """Test Case
    >>> print_ans(2, 3, 3)
    0 2
    >>> print_ans(500000000000, 500000000000, 1000000000000)
    0 0
    """
    if K <= A:
        print(str(A-K) + " " + str(B))
    elif K <= A + B:
        print("0 " + str(A + B - K))
    elif K > A + B :
        print("0 0")


if __name__ == '__main__':
    A, B, K = map(int, input().rstrip().split())
    print_ans(A, B, K)

Submission status: Accepted

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

if B < K:
    print(0, 0)
else:
    print(0, B - K)

Submission status: Accepted

Solution code:

b,a,k=map(int,input().split())
if b>=k:
    print(b-k,a)

if b<k and a+b>=k:
    print(0,a+b-k)

if a+b<k:
    print(0,0)

Submission status: Accepted

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

if K >= A+B:
    print(str(0)+' '+str(0))

elif K < A:
    print(str(A-K)+' '+str(B))

elif K >= A:
    print(str(0)+' '+str(B-(K-A)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if K <= A:
  print(A - K, B)
elif A < K <= A + B:
  print(0, A + B - K)
else:
  print(0, 0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

A, B, K = map(int, input().strip().split(" "))
# print(A, B, K)

if A > K:
    A -= K
    K = 0

else:
    K -= A
    A = 0

if B > K:
    B -= K
    K = 0

else:
    B = 0
    
print("{} {}".format(A, B))

Submission status: Accepted

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

if a >= k:
  a -= k
  print(str(a)+" "+str(b))

elif a< k and a+b >=k:
  b -= (k-a)
  a = 0
  print(str(a)+" "+str(b))

else:
  a = 0
  b = 0
  print(str(a)+" "+str(b))

Submission status: Accepted

Solution code:
cookies = [int(x) for x in input().split()]
leftOver = cookies[0] - cookies[2]
takahashi = max(0, leftOver)
print(str(takahashi)+ ' ' + (str(cookies[1]) if takahashi > 0  else str(max(0,cookies[1] - abs(leftOver)))))

Submission status: Accepted

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

Submission status: Accepted

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

if A >= K:
    print(A-K, B)
elif A < K and (A + B) > K:
    print(0, A + B - K)
else:
    print(0, 0)

Submission status: Accepted

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

    if a == b == 0:
        print(0, 0)
        return

    if k <= a:
        a -= k
    else:
        if k - a <= b:
            b -= k - a
        else:
            b = 0
        a = 0

    print(a, b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if a-k <= 0:
    samai = k-a
    a=0
    if b-samai <= 0:
        b=0
    else:
        b -= samai
else:
    a -= k

print(a,b)

Submission status: Accepted

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

if (K >= A):
    K -= A
    B -= K
    A = 0

    if (B <= 0):
        B = 0
else:
    A -= K

print(str(A) + " " + str(B))

Submission status: Accepted

Solution code:
a=list(map(int, input().split()))
taka=a[0]
ao=a[1]
K=a[2]
if K==taka:
    print(0,ao)
elif K<taka:
    print(taka-K,ao)
elif K>taka and K-taka<=ao:
    print(0,ao-(K-taka))
elif K>taka and K-taka>=ao:
    print(0,0)

Submission status: Accepted

Solution code:
a,b,k = map(int,input().split())
print(str(max(a-k,0)) + " " + str(max(min(b,a+b-k),0)))

Submission status: Accepted

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

if A + B >= K:
    if A >= K:
        x = A - K
        y = B
    if A < K:
        x = 0
        y = B - K + A
if A + B < K:
    x = 0
    y = 0
print('{} {}'.format(x, y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a < k:
    print("{} {}".format(0, max(b - k + a, 0)))
else:
    print("{} {}".format(a - k, b))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = a[0] - a[2]
if b <= 0:
  ans = a[1] + b
  if ans < 0:
    print('0 0')
  else:
    print('0 {}'.format(ans))
elif b == 0:
  print('0 {}'.format(a[1]))

elif b > 0:
  print('{} {}'.format(b, a[1]))

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b, k) = [int(e) for e in lines[0].split(" ")]

    return (a, b, k)


def solve(a, b, k):

    a2 = a
    b2 = b
    if a >= k:
        a2 = a - k
        b2 = b
    else:
        a2 = 0
        b2 = max([b - (k - a), 0])

    return [a2, b2]


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        print("%d %d" % (result[0], result[1]))
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
Ta = a - k
Ao = b + min(Ta, 0)
print(max(0, Ta), max(0, Ao))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if A + B <= K:
    print(0, 0)
    exit()

if K <= A:
    print(A - K, B)
    exit()

if K > A:
    print(0, B - (K-A))
    exit()

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int, K: int):
    if (A<K):
        print(0,max(0,B+A-K))
    else:
        print(A-K,B)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b,k = list(map(int, input().split()))
if(a >= k):
  print(a-k, b)
  exit()
print(0, max([b-(k-a),0]))

Submission status: Accepted

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

Submission status: Accepted

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

if A >= K:
    print(A - K, B)
elif A + B - K >= 0:
    print(0, A + B - K)
else:
    print(0, 0)

Submission status: Accepted

Solution code:
data = input().split(' ')

data_int = [int(data[i]) for i in range(3)]

if(data_int[0] - data_int[2] >= 0):
    print(str(data_int[0] - data_int[2]) + ' ' + str(data_int[1]))
else:
    result = data_int[1] - (data_int[2] - data_int[0])
    if(result < 0 ):
        result = 0
    print('0 ' + str(result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input()
    items = s.split()
    A = int(items[0])
    B = int(items[1])
    K = int(items[2])

    if K <= A:
        print(A - K, B)
    elif K <= A + B:
        print(0, B - (K - A))
    else:
        print(0, 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def print_ans(A,B):
        print(A,end=" ")
        print(B)


if A+B<=K:
    print("0 0")
elif A==B and A==0:
    print(A,end=" ")
    print(B)
else:

    if K>=A: 
        K-=A 
        A=0
        B-=K
        print_ans(A,B)
    else: 
        A-=K
        K=0
        print_ans(A,B)

Submission status: Accepted

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

if A + B > K:
    if A > K:
        A -= K
    else:
        K -= A
        B -= K
        A = 0
else:
    A = 0
    B = 0

print(A, B)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc149/tasks/abc149_b


def main():
    (a, b, k) = map(int, input().split(" "))
    if a > k:
        print("%d %d" % (a - k, b))
    elif a + b > k:
        r = k - a
        print("%d %d" % (0, b - r))
    else:
        print("0 0")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = input().split()
total = int(x[0]) + int(x[1])
k = int(x[2])
if(total <= k):
  print('0 0')
else:
  if(k <= int(x[0])):
    print(str(int(x[0]) - k) + ' ' + x[1])
  else:
    print('0 ' + str(total - k))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str=input().split(" ")

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

taka = a - c
if taka < 0:
    taka = 0

res = a - c
if res > 0:
    res = 0

ao = res + b
if ao < 0:
    ao = 0

print(taka, end = " " )
print(ao)

Submission status: Accepted

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

p = k
if a < k:
    k = k - a
    a = 0
else:
    k = k - a
    a = a - p

if k < 0:
    k = 0
b = b - k
if b < 0:
    b = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
li = [int(i) for i in input().split()]
A = li[0]
B = li[1]
K = li[2]
A-=K
de = 0
if A <= 0 :
    de = abs(A)
    A = 0
B -= de
if B <= 0 :
    B = 0
print(A,B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A > 0:
    if A <= K:
        K = K-A
        A = 0
       
    else:
        A = A-K
        K = 0
    
if A==0 and B > 0 and K > 0:
    if B <= K:
        B = 0
    else:
        B = B-K
  
print(str(A)+" "+str(B))

Submission status: Accepted

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

if a == n:
  a = 0
elif a < n:
  b -= n-a
  a = 0
  if b < 0:
    b = 0
elif a > n:
  a -= n

print("%d %d" %(a,b))

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    A, B, K = input().split()
    A = int(A)
    B = int(B)
    K = int(K)
    A = A - K
    if A < 0:
        B = B + A
        A = 0
    if B < 0:
        B = 0
    print(str(A) + " " + str(B))

Submission status: Accepted

Solution code:
def main():
    A,B,K = map(int,input().split())
    if A+B < K:
        print(0,0)
    else:
        if A < K:
            print(0, A+B-K)
        else:
            print(A-K, B)
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
At,Ba,K = (int(x) for x in input().split())

if K <= At:
    print(At - K)
    print(Ba)
elif K <= At + Ba:
    print(0)
    print(Ba - (K - At))
else :
    print(0)
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
takahashi, aoki, K = map(int, input().split())

if aoki + takahashi <= K:
  print(0, 0)
elif takahashi < K and K <= takahashi+aoki:
  print(0, aoki+takahashi-K)
else:
  print(takahashi-K, aoki)

Submission status: Accepted

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

if k >= a :
  if k >= b :
    if a + b >= k :
      a1 = 0
      b1 = b - k + a
    else :
      a1 = 0
      b1 = 0
  else :
    a1 = 0
    b1 = b - k + a
else :
  a1 = a - k
  b1 = b

print(a1,b1)

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split())
a=0
b=0
if K<A:
  a = A-K
  b = B
elif K<A+B:
  b = B - K + A


print("{} {}".format(a,b))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    a,b,k=MI()
    taka=max(a-k,0)
    if taka:aoki=b
    else:aoki=max(0,b-(k-a))
    print(taka,aoki)
main()

Submission status: Accepted

Solution code:
def solve(a,b,k):
    if a==0 and b==0:
        return '0 0'
    if a>=k:
        str = '%d %d' % (a-k,b)
        return str
    else:
        b = b + a - k
        a = 0
        if b<0:
            return '0 0'
        str = '0 %d' % (b)
        return str 
        

a,b,k = map(int, input().split())
print(solve(a,b,k))

Submission status: Accepted

Solution code:
# coding:utf-8

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

if A == B and A < K and B < K:
    print('0 0')
else:
    if A - K < 0:
        tr = 0
        ar = B - (K - A)
        if ar < 0:
            print('{} {}'.format(tr, 0))
        else:
            print('{} {}'.format(tr ,ar))
    else:
        tr = A - K
        ar = B
        print('{} {}'.format(tr, ar))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if A <= K:
	B=B-(K-A)
	A=0
else:
	A=A-K
if A<0:
	A=0
if B<0:
	B=0
print(str(A)+" "+str(B))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b, k = map(int, input().split())
ra = max(0, a-k)
rb = max(b - k + a, 0) if a < k else b

print(ra, rb)

Submission status: Accepted

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

if a >= k:
    print(a-k,b)
elif b >= k-a:
    print(0,b + (a - k))
else:
    print(0,0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if(int(A)==0):
    if(int(B)==0):
        print(str(A) +" "+ str(B))
    else:
        if(D>=0):
            B = 0
        else:
            B = -D
        print(str(A) +" "+ str(B))
else:
    if(C >= 0):
        B = int(B)-C
        A = 0
        if(B<0):
            B = 0
    else:
        A = int(A)-int(K)
    print(str(A) +" "+ str(B))

Submission status: Accepted

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

if a >= k:
  print(a-k,b)
else:
  if a + b < k:
    print("0 0")
  else:
    print(0,b-(k-a))

Submission status: Accepted

Solution code:
a,b,k= [int(i) for i in input().split()]
if k == a:
    print(0,b)
elif k < a:
    print(a-k,b)
elif k > a:
    print(0, max(b-(k-a),0))

Submission status: Accepted

Solution code:
a,b,k=map(int, input().split())
resa = 0
resb = 0
 
if a <= k:
  resa = 0
else:
  resa = a - k

if b <= (k - a):
  resb = 0
else:
  resb = b - ((k-a) if (k-a) > 0 else 0)

print(str(resa) + " " + str(resb))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

A, B, K = [int(num) for num in input().split()]

if A + B <= K:
    A = 0
    B = 0
    print(A, B)
    sys.exit(0)

if A > K:
    A = A - K
    print(A, B)
    sys.exit(0)
else:
    K = K - A
    A = 0

if B > K:
    B = B - K
    print(A, B)
    sys.exit(0)
else:
    B = 0
    print(A, B)

Submission status: Accepted

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

if A >= K:
  print(A - K, B)
elif B - (K - A) < 0:
  print(0, 0)
else:
  print(0, B - (K - A))

Submission status: Accepted

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

"""
for i in range(k):
    if (a >= 1):
        a -= 1
    elif (b >= 1):
        b -= 1
print("{} {}".format(a, b))
"""

if (a > k):
    ax = a - k
    bx = b
else:
    ax = 0
    bx = max(a+b-k, 0)

print("{} {}".format(ax, bx))

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

a, b, k = list(map(int, sys.stdin.buffer.readline().split()))

if a < k:
    k -= a
    a = 0
    b -= k
    print(a, max(0, b))
else:
    a -= k
    print(a, max(0, b))

Submission status: Accepted

Solution code:
line = input().split(' ')
A = int(line[0])
B = int(line[1])
K = int(line[2])

if K < A:
  print(str(A - K) + ' ' + str(B))
else:
  if K - A < B:
    print(str(0) + ' ' + str(B - K + A))
  else:
    print(str(0) + ' ' + str(0))

Submission status: Accepted

Solution code:
def main():
    a, b, k = map(int, input().split())
    ans_a = a - k
    ans_b = b
    if ans_a < 0:
        ans_b += ans_a
        ans_a = 0
    ans_b = max(ans_b, 0)
    print(ans_a, ans_b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

_a = min(a, k)
a -= _a
k -= _a

_b = min(b, k)
b -= _b
k -= _b

print(a, b)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l 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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    a,b,k = LI()
    b = max(0,b-max(0,(k-a)))
    a = max(0,a-k)

    return JA([a,b]," ")


print(main())

Submission status: Accepted

Solution code:
A,B,K = map(int, input().split())
if A+B<=K:
	print(0,0)
elif A>=K:
	print(A-K,B)
else:
	B2 = B-(abs(K-A))
	print(0,max(0,int(B2)))

Submission status: Accepted

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

a = 0
b = 0

if A-K >=0:
    a = A-K
    b = B
elif B - (K-A) >=0:
    b = B - (K-A)

print(a,b)

Submission status: Accepted

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