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

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

Submission status: Accepted

Solution code:

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

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





if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, k = [int(v) for v in 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:
inpt = input()
 
inpt = inpt.split(" ")
inpt = [int(i) for i in inpt]
 
A = inpt[0]
B = inpt[1]
K = inpt[2]
 
if A >= K:
  A = A - K
else:
  K = K - A
  A = 0
  B = max(0,B - K)

print(A,B)

Submission status: Accepted

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


print(x,y)

Submission status: Accepted

Solution code:
input_list = list(map(int, input().split()))
takahashi = input_list[0]
aoki = input_list[1]
turn = input_list[2]
if takahashi >= turn:
    takahashi -= turn
else:
    turn -= takahashi
    takahashi = 0
    if turn > aoki:
        aoki = 0
    else:
        aoki -= turn
print(takahashi, aoki)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc149/abc149_b
import sys


def s2nn(s): return [int(c) for c in s.split(' ')]


def ss2nn(ss): return [int(s) for s in list(ss)]


def ss2nnn(ss): return [s2nn(s) for s in list(ss)]


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


def i2n(): return int(i2s())


def i2nn(): return s2nn(i2s())


def ii2ss(n): return [i2s() for _ in range(n)]


def ii2nn(n): return ss2nn(ii2ss(n))


def ii2nnn(n): return ss2nnn(ii2ss(n))


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


main()

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:
import sys

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

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if k < a:
  a = a-k

elif a <= 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:
import numpy as np
data = input()
a = np.int64(data.split(' ')[0])
b = np.int64(data.split(' ')[1])
k = np.int64(data.split(' ')[2])

a1 = np.max([0,a-k])
b1 = np.max([b - max((k-a),0),0])

print(str(a1) + ' ' + str(b1))

Submission status: Accepted

Solution code:
def main():
	a,b,k = map(int,input().split())
	# n = int(input())
	# s = str(input())
	# h = list(map(int,input().split()))
	# l = [list(map(int, input().split())) for _ in range(n)]
	# s = list(s)
 
	if k-a >= 0:
		takahashi = 0
		nokori = k-a
		aoki = b - (k-a)
	else:
		takahashi = a-k
		aoki = b
 
	if aoki < 0:
		aoki = 0
	l = []
	l.append(takahashi)
	l.append(aoki)
	# print(l)
	print(' '.join(map(str, l)))
 
	
 
 
if __name__ == '__main__':
	main()

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())
ansa=max(a-k,0)
if a<=k:
  print(ansa,max(b-(k-a),0))
else:
  print(ansa,b)

Submission status: Accepted

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

jdg = K - A
A = A - min(A, K)
B = B - max(0, jdg)
B = max(0, B)
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 <= 0:
    print(str(0) + ' ' + str(0))
else:
    print(str(0) + ' ' + str(a+b-k))

Submission status: Accepted

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

if k >= a:
    k -= a
    a = 0
    if k >= b:
        b = 0
        print(str(a) + ' ' + str(b))
    else:
        b -= k
        print(str(a) + ' ' + str(b))
else:
    a -= k
    print(str(a) + ' ' + str(b))

Submission status: Accepted

Solution code:
import numpy as np

DEBUG = False

def dprint(*args):
    if DEBUG:
        print(*args)

digit = 6

def to_str(x):
    if x[0] == 0:
        return str(x[1])
    else:
        return "{:d}{:06d}".format(x[0], x[1])


def add(x, y):
    carry = 0
    new1 = x[1] + y[1]
    if new1 >= 1000000:
        carry = 1
        new1 -= 1000000
    new0 = x[0] + y[0] + carry
    return [new0, new1]

def sub(x, y):
    carry = 0
    new1 = x[1] - y[1]
    if new1 < 0:
        carry = 1
        new1 += 1000000
    new0 = x[0] - y[0] - carry
    return [new0, new1]

def gt(x, y):
    if x[0] > y[0]:
        return True
    elif x[0] < y[0]:
        return False
    else:
        if x[1] > y[1]:
            return True
        else:
            return False

abk = input().split(' ')
a_s, b_s, k_s = abk

nums = []
for t_str in abk:
    if len(t_str) > 6:
        upper, lower = int(t_str[0:-6]), int(t_str[-6:])
    else:
        upper, lower = 0, int(t_str)
    nums.append([upper, lower])

a, b, k = nums
dprint(a_s, b_s, k_s)
dprint(a, b, k)
dprint(gt(a, b))
dprint(gt(b, a))
dprint(gt(a, k))
dprint(gt(k, a))

if(gt(a, k)):
    result = sub(a, k)
    print(to_str(result), b_s)
else:
    mod = sub(k, a)
    if(gt(b, mod)):
        mod2 = sub(b, mod)
        print(0, to_str(mod2))
    else:
        print(0, 0)

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
a=li[0]
b=li[1]
k=li[2]
if a<k:
    if b<k-a:
        a=0
        b=0
    else:
        b=b-k+a
        a=0
        
else:
    a=a-k

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

Submission status: Accepted

Solution code:
import sys

A, B, C = raw_input().split()
A = int(A)
B = int(B)
C = int(C)

if C <= A:
    print "%ld %ld" % (A-C,B)
elif C <= A + B:
    print "%ld %ld" % (0, A + B - C)
else:
    print "0 0"

Submission status: Accepted

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

print(ansa, ansb)

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

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

Submission status: Accepted

Solution code:
def f(A,B,K):
    a=A-min(A,K)
    b=B-(K-min(A,K))
    if b<0: 
        b=0
    return a,b
A,B,K= map(int,input().split())
a=f(A,B,K)
print(a[0],a[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def answer(A,B,K):
	takahashi = A
	aoki = B

	takahashi = A - K
	if takahashi >= 0:
		return [takahashi,aoki]
	elif takahashi < 0:
		takahashi = 0
		aoki = aoki - abs(A - K)
		aoki = 0 if aoki < 0 else aoki
		return [takahashi, aoki]
	else:
		return [takahashi, aoki]

A,B,K = map(int, input().split())
takahashi, aoki = answer(A,B,K)
print("{} {}".format(takahashi, aoki))

Submission status: Accepted

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

ak = k-a

if 0 < ak :
  
  bk = b - ak 
  
  if 0 < bk :
    
    print(0,bk)
    
  elif bk < 0 :
    
    print(0,0)
  
  elif bk == 0 :
    
    print(0,0)
  
  
elif ak < 0 :
  
  print(a-k,b)
  
elif ak == 0 :
  
  print(0,b)

Submission status: Accepted

Solution code:
a,b,c = [int(i) for i in input().split()]
while True:
    if c <= a:
        a -= c
        print(a, b)
        break
    else:

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(str(max(0, a-k))+' '+str(max(0, min(b, a+b-k))))

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  j=j-(k-i)
  i=0
  if j<0:
    j=0
else:
  i=i-k
print(str(i)+" "+str(j))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = [int(s) for s in input().split()]
X = A+B
if K <= A:
  print(str(A-K)+' '+str(B))
elif K <= X:
  print(str(0)+' '+str(X-K))
else:
  print(str(0)+' '+str(0))

Submission status: Accepted

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

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



print(str(a) + ' '+ str(b))

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    am = min(a, k)
    a -= am
    k -= am
    bm = min(b, k)
    b -= bm
    print(a, b)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
k2=0
a2=0
if a>=k:
    k2=a-k
    a=a-k
    print("{0} {1}".format(a,b))
    exit()
else:
    k2=k-a
    a=0
if b>=k2:
    b=b-k2
else:
    b=0
print("{0} {1}".format(a,b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
 
 
def main():
    list1  = list(map(int, input().split(' '))) 
    a, b, k = list1
  
    if a > k:
        a = a - k
      
    elif a + b >= k:
        b = b - (k - a)
        a = 0
        
    else:
        a = 0
        b = 0
        
    print(a, b)
    
    
  
    return 0
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

if x[2] >= x[0] and x[0] >= 1:
    x[2] -= x[0]
    x[0] = 0

    if x[2] >= x[1] and x[1] >= 1:
        x[1] = 0
    else:
        x[1] -= x[2]

elif x[2] < x[0] and x[0] >= 1:
    x[0] -= x[2]

elif x[0] == 0 and x[1] == 0:
    pass
elif x[0] == 0 and x[1] >= 1:
    if x[2] >= x[1] and x[1] >= 1:
        x[1] = 0
    else:
        x[1] -= x[2]



print(str(x[0]) + " " + str(x[1]))

Submission status: Accepted

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

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 - (k - a))
else:
  print(0,0)

Submission status: Accepted

Solution code:
A,B,K = list(map(int, input().split()))
 
if(A+B>=K and A<=K):
  print(0, end=" ")
  print(B-K+A)
elif(A+B>=K):
  print(A-K, end=" ")
  print(B)
else:
  print(0, end=" ")
  print(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-(k-a)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

a1=max(a-k,0)
k=max(k-a,0)
b=max(b-k,0)
print(a1,b)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A-=X
K-=X
B-=K

print(A,max(0,B))

Submission status: Accepted

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

if T >= 0:
    print(T, O)
elif O+T >=0:
    print(0,O+T)
else:
    print(0,0)

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B, K = read_ints()
ans1 = max(A - K, 0)
left_p = max(K - A, 0)
ans2 = max(B - left_p, 0)
print(ans1, ans2)

Submission status: Accepted

Solution code:
temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]
if k > 0:
  if k < a:
    a = a - k
  else:
    k = k - a
    a = 0
    if k < b:
      b = b - k
    else:
      b = 0

print(str(a)+' '+str(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

eat = min(A, K)
A -= eat
K -= eat
eat = min(B, K)
B -= eat
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:
        B = 0
    else:
        B -= K
else:
    A -= K
print('{} {}'.format(A, B))

Submission status: Accepted

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

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

print(A,B)

Submission status: Accepted

Solution code:
a, b, k = [int(x) for x in 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())
if a>=k:
  print(a-k,b)
elif a+b>=k:
  print(0,b+a-k)
else:
  print(0,0)

Submission status: Accepted

Solution code:
#B
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:
number = input()
a,b,k = [int(ele)for ele in number.split(' ')]
res = a - k
if res < 0:
    a = 0
    b = b + res
    b = 0 if b < 0 else b
else:
    a = res
print(a,b)

Submission status: Accepted

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

elif a <= k:
    TAKA = 0
    AOKI = b-(k-a)
    print(TAKA, AOKI)
else:
    TAKA = a-k
    AOKI = b
    print(TAKA, AOKI)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(A,B)

Submission status: Accepted

Solution code:
from sys import exit
a, b, k = map(int, input().split(" "))


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

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

Submission status: Accepted

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

if k >= a :
    k = k - a
    a = 0
    if k >= b :
        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 k-a >= 0:
  k = k-a
  a = 0
  if b-k >= 0:
    b = b-k
  else:
    b = 0
else:
  a = a-k
    
print(a, end="")
print(" ", end="")
print(b)

Submission status: Accepted

Solution code:
A,B,K= list(map(int, input().split()))
l = []
if(A<K):
    l.append(0)
    l.append(A-K+B)
    if(l[1]<0):
        l[1]=0
else:
    l.append(A-K)
    l.append(B)
print(l[0],l[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

b1 = A - K

o1 = b1 if (b1 > 0) else 0

b2 = -b1

o2 = B - b2 if (b2 > 0) else B

o3 = o2 if (o2 > 0) else 0

o = str(o1) + " " + str(o3)

print(o)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 1行目の入力を空白で分割された数値として扱う
A, B, K = map(int, input().split())

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

# 答えの出力
print(str(A) + " " + str(B))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def acinput():
    return list(map(int, input().split(" ")))


A,B,K=acinput()

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

print(A,max(0,B))

Submission status: Accepted

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

A = A - K
if A < 0:
    B = B + A
    A = 0
if B < 0:
    B = 0

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

Submission status: Accepted

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

Submission status: Accepted

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


def kansuu(A, B, K):
    if A < K:
        K -= A
        A = 0
        if B < K:
            B = 0
            return A, B
        else:
            B -= K
            return A, B
    else:
        A -= K
        return A, B


a = kansuu(A, B, K)
print(a[0], a[1], sep=" ")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions

import math
import fractions

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2つの入力を空白で分割し、数値化
a, b, k = map(int, input().split())

ans_a = max(0, a - k)
ans_b = None

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

print(str(ans_a) + " " + str(ans_b))

Submission status: Accepted

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

Submission status: Accepted

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

newk = k-a
if newk >= 0:
  a = 0
  b = b-newk
  if b <= 0:
    print(str(0) + " " +str(0))
  else:
    print(str(0) + " " + str(b))
else:
  a = a-k
  print(str(a) + " " +str(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)))

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 = [int(i) for i in input().split()]

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

print('{} {}'.format(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, A + 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 A+B <= K:
  print(0,0)
elif A >= K:
  print(A-K,B)
else:
  print(0,B-K+A)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(A,B)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
if a>=k:
    print('{} {}'.format(a-k, b))
elif b>k-a:
    print('{} {}'.format(0, 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,end =" ")
	print(B)
elif A+B > K:
	print(0,end = " ")
	print(B-(K-A))
elif A+B <=K:
	print(0,end = " ")
	print(0)

Submission status: Accepted

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

if a > k:
    c = a - k
    d = b
elif a + b > k:
    c = 0
    d = a + b - k
else:
    c = 0
    d = 0

print(c, d)

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(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 != 0 or b != 0:
    if k >= a:
        k -= a
        a = 0
        b = b - k if k <= b else 0
    else:
        a -= k
print(a, b)

Submission status: Accepted

Solution code:
takahashi, aoki, kaisu = [int(x) for x in input().split()]
taka_amari = takahashi - kaisu
ao_amari = aoki
if taka_amari<0:
    ao_amari = aoki+taka_amari
 
if taka_amari<0:
    taka_amari = 0
if ao_amari<0:
    ao_amari = 0
print(str(taka_amari) + " " + str(ao_amari))