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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from decimal import Decimal

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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=[int(x) for x in 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())


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

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

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:
def q2():
    A, B, K = (int(i) for i in input().split())

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

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


if __name__ == '__main__':
    q2()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if a < k:
    print(0, max(0, b - abs(a - k)))
    exit()

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

Submission status: Accepted

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(A1,B1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = min(A, K)
y = min(B, K - x)
print(A - x, B - y)

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 = list(map(int, input().split()))

a = A
b = B

if K >= a + b:
    ans1 = 0
    ans2 = 0
else:
    if K <= a:
        ans1 = a - K
        ans2 = b
    else:
        ans1 = 0
        ans2 = b - (K - a)
print(ans1, ans2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


# エントリーポイント
def main():
    A, B, K = input([int, 3])
    a = A - K
    if K <= A:
        print(A - K, B)
        return
    if K <= A + B:
        print(0, B - (K - A))
        return
    print(0, 0)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, K = [int(i) for i in input().split()]
a = max(0, A - K)
b = max(0, B - K + A - a)
print(a, b)

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+a-k])

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  A, B, K = map(int, readline().split())
  if A>=K:
    print(A-K, B)
  else:
    print(0, max(B-K+A,0))
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

print(A, B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))





a,b,k=input2()



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

print("{} {}".format(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:
# solution
import io

nim, mike, kite = map(int, input().split())
print(max(nim - kite, 0), max(mike - max(kite - nim, 0), 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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,b-(k-a))
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b = b - tmp 

if b < 0:
    b = 0

print(a,b)

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

Submission status: Accepted

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

#もし高橋君がクッキーを 1 枚以上持っているなら、高橋君のクッキーを 1 枚食べる。
#そうでなく、もし青木君がクッキーを 1 枚以上持っているなら、青木君のクッキーを 1 枚食べる。
#高橋君も青木君もクッキーを持っていないなら、何もしない。

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

Submission status: Accepted

Solution code:
a, b, k = (int(x) for x 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())
a_ = max(0, a-k)
b_ = max(0, b - max(k-a, 0))
print('{} {}'.format(a_,b_))

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

Submission status: Accepted

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

Submission status: Accepted

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

if a >= k:
    a -= k

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

Submission status: Accepted

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

print(a1, b1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,k=[int(i) for i in 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())

tak = A
aok = B

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

print(tak, aok)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c= input().split()
x,y,z=(int(a),int(b),int(c))
if x >= z:
    a_b = str(x-z)
    print(a_b +' '+ str(y))
elif x+y >= z:
    a_c = str(x+y-z)
    print('0 ' + a_c)
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 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(A-K, B)
else:
    print(0, max(0, B-(K-A)))

Submission status: Accepted

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

Submission status: Accepted

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

if A == 0 and B == 0:
    print(A, B)
    exit()

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

print(remain_A, remain_B)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b, k = map(int, input().split())
if a > k:
    a = a - k
else:
    tmp = a
    a = 0
    if b < k - tmp:
        b = 0
    else:
        b = b - (k - tmp)
print(a, b)

Submission status: Accepted

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

# takahashi has A cookies, aoki has B cookies
# takahashi eats K times

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:
A0, B0, K = map(int, input().split())


A1 = max(0, A0 - K)

B1 = max(0, B0 - (K - (A0 - A1)))

print(A1, B1)

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

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

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

print(A, B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputted = list(map(int, input().split()))
A = inputted[0]
B = inputted[1]
K = inputted[2]

A2 = max([0, A - K])
B2 = max([0, B - max([0, K - A])])

answer = '{} {}'.format(A2, B2)

print(answer)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
A,B,K = map(int, input().split())

for i in range(2):
    if K <= A: # K<Aの時はAが残って終了
        A -= K
        K =0
        break
    elif 0 < A : # ０＜A<Kの時、Aがなくなる
        K -= A
        A =0
    elif K < B: # A終了後でもK<BならBが残って終了
        B -= K
        K = 0
        break

    elif B <= K:# B　<　Kの時、Bがなくなる
        K -= B
        B =0
        break
    elif K <B:
        B -=K
        break

print(A,B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if k<a:
  a -= k
  print("%d %d"%(a, b))
  exit(0)
else:
  k-=a
  a=0
  
if k<b:
  b -= k
  print("%d %d"%(a, b))
  exit(0) 
else:
  k-=b
  b=0
  
print("%d %d"%(a, b))

Submission status: Accepted

Solution code:
s,t,n=map(int,input().split())

if s>=n:
  print(s-n,t)
elif s<n and t-n+s>=0:
  print(0,t-n+s)
elif s<n and t-n+s<0:
  print(0,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('{} {}'.format(a, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

total = a + b - k

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/B-GreedyTakahashi.py
#
a, b, k = map(int, input().split())

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

print(a, b)