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:
# -*- coding:utf-8 -*-
a,b,k = map(int, input().split())

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

Submission status: Accepted

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

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

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


print("{0} {1}".format(ans_a,ans_b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,L = (int(x) for x  in input().split())

if N > L:
  print(N-L,M)
elif N+M > L:
  print(0,M-L+N)
else:
  print(0,0)

Submission status: Accepted

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

Submission status: Accepted

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

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:
a,b,k = map(int,input().split())
a, b = max(0,a-k), max(0,b-max(k-a,0))
print("{} {}".format(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, 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 k<=a+b:
    print(0, a+b-k)
else:
    print(0, 0)

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
tmp = a-k
print("{} {}".format(max(tmp, 0), max(b+min(tmp, 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 = map(int, input().split())

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

Submission status: Accepted

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

if a > loop_max:
	a = a - loop_max
	loop_max = 0
else:
	loop_max = loop_max - a
	a = 0

if b > loop_max:
	b = b - loop_max
	loop_max = 0
else:
	loop_max = loop_max - b
	b = 0

print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

tabeta_a=min(a,k)
tabeta_b=min(b,k-tabeta_a)
print(a-tabeta_a,b-tabeta_b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
A, B, K = map(int, input().split(" "))
if A - K >= 0:
    print(A - K, B)
else:
    print(0, B + A - K if B + A - K >= 0 else 0)

Submission status: Accepted

Solution code:
a, b, k = [int(i) for i in input().split(" ")]
if a >= k:
    print("%d %d" % (a - k, b))
else: # a < k
    print("%d %d" % (0, max([b + (a - k), 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 >= a:
    k -= a
    a = 0

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

else:
    print(a-k, b)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if k <= a:
	a -= k

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

print(a, b)

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split())
 
A_= max(0,A-K)
K = max(0,K-A)
B_ =  max(0,B-K)
print("{} {}".format(A_,B_))

Submission status: Accepted

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

A_= max(0,A-K)
K = max(0,K-A)
B_ =  max(0,B-K)
print("{} {}".format(A_,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
    
#print(a,b,k)
if k>=b:
    b=0
else:
    b=b-k
print(a,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
    
#print(a,b,k)
if k>=b:
    b=0
else:
    b=b-k
print(a,b)

Submission status: Accepted

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

A=int(args[0])
B=int(args[1])
K=int(args[2])

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:
def main():
    A, B, K = map(int, input().split())

    B = max(0, B-max(K-A, 0))
    A = max(0, A-K)
    print("{} {}".format(A, B))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = A - K
k = K - A
if k <= 0:
    k = 0
b = B - k

if a <= 0:
    a = 0
if b <= 0:
    b = 0

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a > k:
    a_ans = a - k
    b_ans = b
elif b > k-a:
    b_ans = b-(k-a)

print(a_ans, b_ans)

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

def resolve():
    inp = input().split()
    a = int(inp[0])
    b = int(inp[1])
    k = int(inp[2])

    if (a - k) <= 0 :
        k = k - a
        a = 0
    else:
        a = a - k
        k = 0

    if (b - k) <= 0:
        k = k - b
        b = 0
    else:
        b = b - k
        k = 0

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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 = (A + B) - K
print(a,end=" ")
print(b)

Submission status: Accepted

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

cA = A
cB = B

if A+B <= K:
    cA = 0
    cB = 0
else:
    if A >= K:
        if A == K:
            cA = 0
        elif A > K:
            cA = A - K
    else:
        cA = 0
        if A+B <= K:
            cA = 0
            cB = 0
        else:
            cB = B - (K - A)

print(cA,cB)

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)
elif a+b < k:
	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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    A, B, K = map(int, input().split())
    a = max(A - K, 0)
    K -= A - a
    b = max(B - K, 0)
    print(*[a, b])


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(A,B)

Submission status: Accepted

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

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
 
print('{} {}'.format(A, max(0, B)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

Solution code:
abk = input().split()
a = int(abk[0])
b = int(abk[1])
k = int(abk[2])
if(a+b<=k):
    a = 0
    b =0
elif(a>=k):
    a = a-k
elif(a+b>=k):
    b = a + b- k
    a = 0
print(a,b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
row = sys.stdin.readline
 
def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)
 
print(max(0, A - K),max(0, B-max(0,(K-A))))

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,k = list(map(int,input().split(' ')))
"""takahashi has a
   aoki has b
   loop k

for _ in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  elif a == 0 and b == 0:
    break
"""
if a <= k:
  k -= a
  a = 0
else:
  a -= k
  k = 0

#print('a,k',a,k)  

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

#print('b,k',b,k)  
  
print(a,b)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(lasttakahashi, lastaoki)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A,B,K = [int(i) for i in input().rstrip().split(' ')]
if K >= A:
    A,K = 0,K-A
    B -= K
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 >= 1:
    if A >= K:
        A-=K
        print(str(A) + ' ' + str(B))
    else:
        #A = 0
        if B >= 1:
            if B-(K-A) >= 0:
                print(str(0) + ' ' + str(B-(K-A)))
            else:
                print(str(0) + ' ' + str(0))
else:
    if B >= K:
        B-=K
        print(str(0) + ' ' + str(B))
    else:
        print(str(0) + ' ' + str(0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
x = input().split()
A, B, K = [int(i) for i in x]
if A - K > 0:
  print(str(A-K) + " " + str(B))
elif A+B-K > 0:
  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:
  k = k - a
  a = 0
  b = b - k
  if b < 0:
    b = 0
  else:
    pass
else:
  a -= k
print(a, b)

Submission status: Accepted

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


def main():
    a, b, k = map(int, input().split())
    x = min(a, k)
    k -= x
    a -= x
    x = min(b, k)
    k -= x
    b -= x
    print(a, b)
    
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:
# B - Greedy Takahashi

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

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

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

Submission status: Accepted

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


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

print(*ans)

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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B,K = inputMap()

	if A > 0:
		if A <= K:
			K = K-A
			A = 0
			#print(K)
		else:
			print("{} {}".format(A-K, B))
			sys.exit()

	#print("{} {}".format(A, B))
	if B > 0:
		if B <= K:
			print("{} {}".format(0, 0))
			sys.exit()
		else:
			#print("ss")
			B = B-K
			print("{} {}".format(A, B))
			sys.exit()

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




if __name__ == "__main__":
	main()

Submission status: Accepted

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

m = min(a,k)
ans_a = a - m
ans_b = b- min(b, k-m)

print(ans_a,ans_b)

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
ansT=0
ansA=0
ans=0

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

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


"""
while k > 0:
    if a > 0:
        a -= 1
        k -= 1
    else:
        b -= 1
        k -= 1
print(a,b)
"""

Submission status: Accepted

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

A = a - k
B = b + (a - k)

if A >= 0:
  print(A, b)
if A < 0 and B <= 0:
  print(0,0)
if A < 0 and B > 0:
  print(0,B)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B,K = map(int, input().split())

if A>K:
	print('{} {}'.format(A-K,B))
else:
	if K-A<B:
		print('{} {}'.format(0,B-(K-A)))
	else:
		print('{} {}'.format(0,0))

Submission status: Accepted

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

if K-A >= 0:
    t_num = 0
    a_num = B - (K-A)
    if a_num < 0:
        a_num = 0
elif K-A < 0:
    t_num = A-K
    a_num = B

print(t_num,a_num)

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+a-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 < 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:
    if b >= k-a:
        print("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,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 >= k:
    print('{} {}'.format(a-k,b))

elif (a + b) > k:
    print('0 {}'.format(a+b-k))

elif (a + b) <= k:
    print('0 0')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print("%d %d" % (ansa,ansb))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

if A >= 1:
    tmp = A - K
    if tmp <= 0:
        A = 0
        K = abs(tmp)
        
    else:
        K = 0
        A = tmp
        

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

a, b, k = [int(line) for line in readline().split()]

if ( k - a ) >= 0:
  k -= a
  a = 0
  if ( k - b ) >= 0:
    b = 0
  else:
    b -= k
else:
  a -= k
  
print('{} {}'.format(a, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    a, b, k = na()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if a >= k:
    ans_a = a - k
    ans_b = b

if a < k and a + b >= k:
    ans_a = 0
    ans_b = a + b - k

if a < k and a + b < k:
    ans_a = 0
    ans_b = 0

print(ans_a, ans_b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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