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:
a, b, k = map(int, input().split())
x = min(a, k)
a -= x
k -= x
y = min(b, k)
b -= y
k -= y
print(a, b)

Submission status: Accepted

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

A -= K

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

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

Submission status: Accepted

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

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

else :
	a = a - k

print(a, b)

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:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

A,B,K = II()

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

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
if a-k<1:
    if b-(k-a)>=1: 
        print(0,b-(k-a))
    else:
        print(0,0)
else:
    print(a-k,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, a + b - k))

Submission status: Accepted

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

if K <= A:
    ans1 = A-K
    ans2 = B
else:
    ans1 = 0
    ans2 = max(0,B-(K-A))

print(ans1,ans2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(map(int, input().split()))
ka = k - a
if ka <= 0:
    print('%d %d' % (a - k, b))
else:
    if b < ka:
        ka = b
    print('0 %d' % (b - ka))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

a, b, k = map(int, input().split())
print(max(0, a-k), max(0, b-max(0, k-a)))

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split())
if A >=K :
  print(*[A-K,B])
elif A < K and 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:
    k -= a
    a = 0
    if b <= k:
        b = 0
    else:
        b -= k
else:
    a -= k

print(a, b)

Submission status: Accepted

Solution code:
def A():
    temp = input().split()
    print(''.join(temp[::-1]))

def B():
    temp = [int(n) for n in input().split()]
    A = temp[0]
    B = temp[1]
    K = temp[2]
    to_minus = min(A, K)
    A -= to_minus
    K -= to_minus
    if K > 0:
        B -= min(B, K)
    print (A, B)

B()

Submission status: Accepted

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

a, k = a - min(a, k), k - min(a, k)
if k:
    b = b - min(b, k)
print(a, b)

Submission status: Accepted

Solution code:
#  Copyright: this code was written at Dec 30th, 2019. for AtCoder, by Silviase
a, b, k = map(int, input().split())
if a + b < k:
    print("0 0")
elif a < k:
    print("0 " + str(a + b - k))
else:
    print(str(a-k) + " " + str(b))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if A==0 and B==0:
  pass
elif A>0:
  if A>=K:
  	A = A-K
  elif A+B>K:
    B = B-K+A
    A = 0
  else:
    A=0
    B=0
elif B>K:
  B=B-K
else:
  B=0
print('%d %d' % (A,B))

Submission status: Accepted

Solution code:
A, B, K = list(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, c = map(int, input().split())
if c <= a:
    print(a-c, b)
else:
    print(0, max(b-(c-a), 0))

Submission status: Accepted

Solution code:
Takahashi, Aoki, count = input().split()

tk = int(Takahashi)
ak = int(Aoki)
c = int(count)

t = 0


if tk >= c:
    tk = tk - c

else:
    c = c - tk
    tk = 0
    if ak >= c:
        ak = ak - c
    else:
        ak = 0

print(tk, ak)

Submission status: Accepted

Solution code:
a,b,k= map(int,input().split())
ans1=a-k
if ans1<0:
    ans2=b-(k-a)
    ans1=ans1-ans1
else:
    ans2=b
if ans2<0:
    ans2=0
print("{} {}".format(ans1,ans2))

Submission status: Accepted

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

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

print(A_, B_)

Submission status: Accepted

Solution code:

input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans[0], ans[1])

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
A,B,K=[int(s) for s in input().split()]
if K>=A+B:
  ls=[0,0]
elif K>=A:
  ls=[0,B+A-K]
else:
  ls=[A-K,B]
print(*ls)

Submission status: Accepted

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

Submission status: Accepted

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

from collections import deque, defaultdict
import itertools as ite
import sys
import math
import decimal

sys.setrecursionlimit(1000000)

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

A, B, K = map(int, raw_input().split())
if K <= A:
    print A - K, B
elif K <= A + B:
    print 0, A + B - K
else:
    print 0, 0

Submission status: Accepted

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

Submission status: Accepted

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

times = min(k, a) 
a -= times
b = max(b - (k-times), 0)
print(a, b)

Submission status: Accepted

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

if A-K>=0:
    print(A-K,end=" ")
    print(B)
elif A-K<0 and A+B-K>=0:
    print("0",end=" ")
    print(B-(K-A))
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-(k-a),0))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
A1 = A - K
B1 = B
if A1 < 0:
    B1 = A1 + B
    A1 = 0
    if B1 < 0:
        B1 = 0

print(A1,end=" ")
print(B1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def judge(a,b,k):
	# aのみを食べる場合
	if k <= a: return a-k, b
	# a,bを食べる場合
	rest_k = k-a
	if rest_k <= b: return 0, b-rest_k
	return 0,0

a,b,k = [int(e) for e in input().split(" ")]
a,b = judge(a,b,k)
print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os
import sys

def main():
    A , B , K = map(int , input().split())
    if K >= A :
        KK = K - A
        A = 0

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

while k != 0:
    if a > 0:
        t = min(a, k)
        a -= t
        k -= t
    elif b > 0 and k > 0:
        t = min(b, k)
        b -= t
        k -= t
    if a == 0 and b == 0:
        break

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
A,B,K=map(int,input().rstrip().split())
 
"""
def resolve():
    if(A>K):
        ansA=int(A)-int(K)
        ansB=int(B)
    else:
        ansA=0
        ansB=int(B)-(int(K)-int(A))
        if(ansB<0):
            ansB=0
    print(str(int(ansA))+" "+str(int(ansB)))
"""

def resolve():
    if(A>K):
        ansA=int(A)-int(K)
        ansB=int(B)
    else:
        ansA=0
        ansB=int(B)-(int(K)-int(A))
        if(ansB<0):
            ansB=0
    print(ansA,ansB)


import sys
from io import StringIO
import unittest
#1000000000000 1000000000000 1000000000001
class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2 3 3"""
        output = """0 2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """500000000000 500000000000 1000000000000"""
        output = """0 0"""
        self.assertIO(input, output)
 
if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

Solution code:
a,b,k = map(int,input().split())
if k <= a:
  print(a-k,b)
elif 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:
    a = a-k
    k = 0
    print(a,b)
elif a<k:
    k =k-a
    a =0
    print(0, max(0,b-k))

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 K>=A+B:
    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())
A=a
B=b
if a>=k:
    A=a-k
elif a<k:
    B=b-(k-a)
    A=0
    if B<0:
        B=0
else:
    A=0
    B=0
    
print(A,B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
#食べられた後のa
A=a
#食べられた後のb
B=b
K=k

if a>=k:
    A=a-k
    print(A,B)
elif a<k:
    B=b-(k-a)
    A=0
    if k-a>=b:
        B=0
    print(A,B)
else:
    A=0
    B=0
    print(A,B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#b
a,b,k=list(map(int,input().split()))
ans=[]
if k<=a:
    ans.append(a-k)
    ans.append(b)
elif (k-a)<=b:
    ans.append(0)
    ans.append(b-k+a)
else:
    ans.append(0)
    ans.append(0)
x=str(ans[0])+' '+str(ans[1])
print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,k = map(int, input().split())
if k <= a:
  print(a-k,b)
elif a<k and 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 >=0:
  taka = a-k
  aoki = b
else:
  taka = 0
  if b - (k-a) >=0:
  	aoki = b - (k-a)
  else:
    aoki = 0
print(str(taka) + " " + str(aoki))

Submission status: Accepted

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

Submission status: Accepted

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

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

if k >= (a+b):
    print('{0} {1}'.format(0,0))
elif k < a:
    print('{0} {1}'.format(a-k, b))
elif k >= a:
    print('{0} {1}'.format(0, b-(k-a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin as st


def main():
    l = [int(e) for e in st.readline().split()]
    if l[0] <= l[2]:
        l[2] -= l[0]
        l[0] = 0
        if l[1]<=l[2]:
            print('0 0')
        else:
            l[1] -= l[2]
            l[2] = 0
            print('%d %d' % (l[0], l[1]))
    else:
        l[0] -= l[2]
        l[2] = 0
        print('%d %d' % (l[0], l[1]))


main()

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
if a-k >= 0:
  print(a-k, b)
elif b-(k-a)>=0:
  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(*[A-K,B])
elif B >= (K-A):
    print(*[0,B-K+A])
else:
    print(*[0,0])

Submission status: Accepted

Solution code:
ta_c,ao_c,num = map(int,input().split())

if num <= ta_c:
    print(ta_c-num,ao_c)
elif ta_c < num <= ta_c + ao_c:
    ao_c = ta_c+ao_c - num
    ta_c = 0
    print(ta_c,ao_c)
else:
    ta_c, ao_c = 0,0
    print(ta_c,ao_c)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a, b, k = map(int, readline().split())

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

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

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

if k <= a:
    a = a - k
elif a < k and k <= (a + b):
    b = b - (k - a)
    a = 0
elif (a + b) < k:
    a = 0
    b = 0

print(a, b)

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Greedy Takahashi
A, B, K = map(int, input().split())
if K <= A:
    print(A - K, B)
elif K <= A + B:
    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(max(0,a-k),b)
else:
    print(0, max(a+b-k,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
if k >= a + b:
    a = 0
    b = 0
elif a <= k:
    b = b + a - k
    a = 0
else:
    a -= k
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 = map(int, input().split())

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

Submission status: Accepted

Solution code:
In = input().split(" ")
T = int(In[0])
A = int(In[1])
K = int(In[2])
 
if K <= T:
  print("{0} {1}".format(T-K,A))
elif K <= T+A:
  print("0 {0}".format(A-(K-T)))
else:
  print("0 0")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 # 998244353
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    a,b,k=map(int,input().split())
    if(a>=k):
        print(a-k,b)
    else:
        k-=a
        b=max(0,b-k)
        print(0,b)
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
bbn=1000000007
	
#+++++
		
def main():
	a, b, k = map(int, input().split())
	ret_a=a
	ret_b=b
	if a >= k:
		print(str(a-k)+' '+str(b))
	elif a+b >= k:
		print('0 '+str(a+b-k))
	else:
		print('0 0')
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

RA = max(A - K, 0)
KK = max(K - A, 0)
RB = max(B - KK, 0)

print('{} {}'.format(RA, RB))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout

input = stdin.readline()[:-1].split(' ')

takahashi = int(input[0])
aoki = int(input[1])
k = int(input[2])

if k > 0:
    if takahashi > k:
        prev_k = k
        takahashi = takahashi - prev_k
        k = prev_k - takahashi
    else:
        k = k - takahashi
        takahashi = 0

if k > 0:
    if aoki > k:
        aoki = aoki - k
    else:
        aoki = 0

print('{} {}'.format(takahashi, aoki))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

a=0
b=0

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

print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
a =l[0]
b =l[1]
k =l[2]

t = a - k
if (t < 0):
    a = 0
    u = b + t
    if(u < 0):
        b = 0
    else:
        b = u
else:
    a = t

print(str(a) + " " +str(b))

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
c=a-k
if c<0:
  b=b+c
  a=0
  if b<0:
    b=0
if c>=0:
  a=c
A=str(a)
B=str(b)
print(A+" "+B)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(1000000000)


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = list(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 A>K:
    print(A-K,B)
elif A+B>K:
    print(0,A+B-K)
else:
    print(0,0)

Submission status: Accepted

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

a = 0
b = 0

c = t_a_k[0] - t_a_k[2]

if c >= 0:
    print("{0} {1}".format(c, t_a_k[1]))
elif c < 0:
    d = c + t_a_k[1]
    if d < 0:
        print("0 0")
    else:
        print("0 {0}".format(d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
A, B, K = (int(n) for n in input().split())

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

Submission status: Accepted

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b==0:
	print("0 0")
elif a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0 0")
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print("0 0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,'',b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=0
		
	print("0",j)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    numbers = input().split(" ")
    takahashi = int(numbers[0])
    aoki = int(numbers[1])
    repeat = int(numbers[2])
    if repeat == 0:
        pass
    elif takahashi >= repeat and takahashi > 0:
        takahashi -= repeat
    elif aoki == 0:
        takahashi -= min(takahashi, repeat)
    elif takahashi == 0 and aoki >= repeat:
        aoki -= repeat
    elif takahashi + aoki < repeat:
        aoki = 0
        takahashi = 0
    else:
        aoki += takahashi
        aoki -= repeat
        takahashi = 0

    print(str(takahashi) + " " + str(aoki))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B,K = input().split()
    #まず高橋くんのクッキーを食べる
    wkKA = int(K) - int(A)
    if wkKA > 0:
        wkKB =  int(B) - wkKA
        if wkKB > 0:
            print(0, wkKB)
        else:
            print(0, 0)
    else:
        print(int(A)-int(K), B)

main()

Submission status: Accepted

Solution code:
maisu = [int(i) for i in input().split()]

if maisu[0] + maisu[1] <= maisu[2]:
    print(0, 0)

elif maisu[0] >= maisu[2]:
    print((maisu[0] - maisu[2]), maisu[1])
    
elif maisu[0] < maisu[2]:
    print(0, maisu[1] - (maisu[2] - maisu[0]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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


if A or B:
    for i in range(K):
        if A >= 1:
            A -= 1
        elif B >= 1:
            B -= 1
        else:
            pass

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

Submission status: Accepted

Solution code:
A,B,K =  map(int,input().split())
if K==0:
    print("{} {}".format(A, B))
elif A==0&B==0:
    A=0
    B=0
    print("{} {}".format(A, B))
elif A<K:
    B=B-(K-A)
    if B<0:
        B=0
    A=0
    print("{} {}".format(A, B))
elif A==K:
    A=0
    print("{} {}".format(A, B))
else :
    A = A-K
    print("{} {}".format(A, B))