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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(A,B)

Submission status: Accepted

Solution code:
# import math
# from itertools import permutations as permus
# from fractions import gcd

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,b,k = map(int,input().split())

takahasi = a
aoki = b

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

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

print(takahasi,aoki)

Submission status: Accepted

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

ansA = max(A-K, 0)
K = max(K-A, 0)
ansB = max(B-K, 0)

print(ansA, ansB)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, k = list(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())

ta = max(a - k, 0)
ao = b
if ta == 0:
    ao = max(b - (k - a), 0)

print(ta, ao)

Submission status: Accepted

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

if a > 0 and k >= a:
	k -= a
	a = 0
elif a > 0:
	a -= k
	k = 0

if b > 0 and k >= b:
	k -= b
	b = 0
elif b > 0:
	b -= k
	k = 0

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(A: int, B: int, K: int):
    fa = max(0, A - K)
    # print(fa)
    diff = K - (A - fa)
    # print(diff)
    fb = max(0, B - diff)
    # print(fb)
    print(fa, fb)


# 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())
print(max(a-k,0),max(b-max(k-a,0),0))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(str(max(0,a)) + ' ' + str(max(0,b)))

Submission status: Accepted

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

print(ansa, ansb)

Submission status: Accepted

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

if A-K < 0:
  #まずBを計算
  B = B-(K-A) if (B-(K-A)) >= 0 else 0
  #続いてAを計算
  A = 0
else:
  A -= K  

print(A,B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inp=input().split()
a = int(inp[0])
b = int(inp[1])
k = int(inp[2])
if (k>=a+b):
    print('0 0')
else:
    if (a>=k):
        print('{} {}'.format(a-k, b))
    else:
        print('0 {}'.format(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())

e = min([K, A])
a = A - e
e = min([K-e, B])
b = B - e
print(a, b)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(A,B)

Submission status: Accepted

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

X = max(0,A-K)
Y = max(0,min(B,B-(K-A)))

print(X,Y)

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

A, B, K = input_nums()

res_a = A - K if A >= K else 0
remain = K - A
if remain > 0:
    res_b = B - remain if B >= remain else 0
else:
    res_b = B
print('{} {}'.format(res_a, res_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:
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
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())
f = max(0, a - k)
k = max(0, k - a)
s = max(0, b - k)
print(f, s)

Submission status: Accepted

Solution code:
import sys
import math
import fractions
import itertools
from collections import deque
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()

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())
val=min(a,k)
a-=val
k-=val
val=min(b,k)
b-=val
k-=val
print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
def inputS(): return input().rstrip().decode()
readlines = sys.stdin.buffer.readlines  

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
def inputS(): return input().rstrip().decode()
readlines = sys.stdin.buffer.readlines  

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

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

Submission status: Accepted

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

if k>=a:
    tn = 0
    an = max(0,b-k+a)
else:
    tn = a-k
    an = b

print(str(tn) + ' ' + str(an))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(a, b)

Submission status: Accepted

Solution code:
a, b, k = list(map(int, input().split()))
res = min(a, k)
k -= res
a -= res
res = min(b, k)
k -= res
b -= res
print(a, end=" ")
print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a > 0:
    al = a-k
    if a >= k:
        bl = b
    else:
        bl =b-k+a
    if al <= 0:
        al = 0
    if bl <= 0:
        bl = 0

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

print(al,bl)

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

a,b,k = get_nums_l()

tak = max(0, a-k)

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

print(tak, aok)

Submission status: Accepted

Solution code:
import sys
A,B,K=map(int,input().split())
tmp=B
if((A-K)<0):
    if((B+(A-K)) < 0):
        print('0 0')
        sys.exit()
    else:
        tmp+=(A-K)
        print('0 {}'.format(tmp))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(map(int, input().split()))
if S[2] >= S[0] + S[1]:
  print(0,0)
elif S[2] >= S[0]:
  print(0,S[1]+S[0]-S[2])
else:
  print(S[0]-S[2],S[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

b = max(0,b-k)

print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(a,b,k):
    takahasi = a
    total = a+b
    if 0 <= k <= a:
        return [a-k,b]
    elif a < k <= total:
        return [0, a+b-k]
    else:
        return [0,0]

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

Submission status: Accepted

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

Submission status: Accepted

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

if A >= K:
    A_rest = A - K
    B_rest = B

else:
    A_rest = 0
    n = K - A
    
    if n <= B:
        B_rest = B - n
    else:
        B_rest = 0
        
print(A_rest, B_rest)

Submission status: Accepted

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

a = num[0]
b = num[1]

if a+b<=num[2]:
  a=0
  b=0
elif a+b>num[2] and a>num[2]:
  a = a - num[2]
elif a+b>num[2] and a<=num[2]:
  b = b - (num[2] - a)
  a = 0


print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# TEだった
# for _ in range(k):
#     if a >= 1:
#         a -= 1
#     elif b >= 1:
#         b -= 1

ans_a = 0
ans_b = 0

if a >= k:
    ans_a = a - k
    ans_b = b
else:
    ans_a = 0
    if b >= (k - a):
        ans_b = b - (k - a)
    else:
        ans_b = 0

print(ans_a, ans_b, sep=" ")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N,M,K=map(int,input().split())

if N<K:
  M=M-(K-N)
  N=0
else:
  N=N-K

if M<0:
  M=0
print(N,M)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

x = max(0,a-k)
y = b;
if x == 0:
    y = max(0, b + a - k)

print(x,y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b, k = na()
i = min(k, a)
res = k - i
if res == 0:
    print(a - i, b)
if res > 0:
    i = min(res, b)
    res -= i
    if res > 0:
        print(0, 0)
    else:
        print(0, b - i)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
  a,b,k=(int(x) for x in input().split())
  
  if(a<k):
    k-=a
    a=0
    if(b<k):
      b=0
    else:
      b-=k
  else:
    a-=k
  print(str(a)+" "+str(b))

Submission status: Accepted

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

t = a[0]-a[2]

if t<0:

    a[1] = a[1] +t
    if(a[1] < 0):
        a[1] = 0
    t = 0

print("%d %d"%(t,a[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

A = (l[0]-l[2])*(l[0]-l[2] > 0)

B = l[1] - (-(l[0]-l[2]))*(l[0]-l[2] < 0)
B = B*(B>0)

print(A,B)

Submission status: Accepted

Solution code:
a, b, k = (int(x) for x in 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:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    A, B, K = read_int_list()
    a = A - K
    if a < 0:
      a = 0

    b = B - abs(A - K)
    if b < 0:
      b = 0
    if A > K:
      b = B

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

k = max(A - K, 0)

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

Submission status: Accepted

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

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

else:
    A-=K
    print(A,end=' ')
    print(B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,K=map(int,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:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc149/tasks/abc149_b

a, b, k = [int(x) for x in 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:
X,Y,Z = map(int,input().split())
if(X < Z):
    Z -= X
    X = 0
    if(Y < Z):
        Y = 0
    else:
        Y -= Z
else:
    X -= Z
print(X,Y)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':

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

	taka = max(a - mai,0)

	if taka > 0:
		aoki = b
	else:
		aoki = max(b + a - mai,0)

	print(taka,aoki)

Submission status: Accepted

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

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

print(a_c, b_c)

Submission status: Accepted

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

Submission status: Accepted

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

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 = [int(_) for _ in input().split()]
if K <= A:
    A -= K
elif K <= A+B:
    B -= K-A
    A = 0
elif A+B < K:
    A = 0
    B = 0
print(A, B)

Submission status: Accepted

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

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

print(T,end=" "),print(A)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(max(0, A-K), max(0, min(B,A+B-K) ))

Submission status: Accepted

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

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,A+B-K)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


A, B, K = InL()

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

Submission status: Accepted

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

A -= n
K -= n

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

print(A, B)

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int, K: int):
    if A >= K:
        print("%d %d" % (A-K, B))
    elif A < K:
        print("%d %d" % (0, max(0, B-(K-A))))
    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 K > A:
    B = max(B - (K - A), 0)
    A = 0
else:
    A = A - K

print(A, B)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if K == 0:
    print(A, B)
else:
    X = min(B, K)
    B -= X
    K -= X
    print(A, B)

Submission status: Accepted

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

c = a - k


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