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())
quant = A + B

if quant - K <= 0:
    print('0 0')
else:
    rnt = A - K  # RemainNumTime
    a = max(rnt, 0)
    b = min(B + rnt, B)
    print(str(a) + ' ' + str(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(map(int,input().split()))
if s[0]<=s[2]:
  s[2]-=s[0]
  s[0]=0
else:
  s[0]-=s[2]
  s[2]=0
if s[1]<=s[2]:
  s[1]=0
else:
  s[1]-=s[2]
print(*[s[0],s[1]])

Submission status: Accepted

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

Submission status: Accepted

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

t_zan = a - k
if t_zan < 0:
  aoki_zan = b + t_zan
  t_zan = 0
else:
  aoki_zan = b

if aoki_zan < 0:
  aoki_zan = 0

print(str(t_zan) + ' ' + str(aoki_zan))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#149
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 = [int(elem) for elem in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def main():
    a, b, k = map(int, input().split())
    result_a = 0
    result_b = 0
    if k >= a:
        result_a = 0
        if (k - a) >= b:
            result_b = 0
        else:
            result_b = b - (k - a)
    else:
        result_a = a - k
        result_b = b

    print(str(result_a) + " " + str(result_b))


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


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

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:
import sys
input=sys.stdin.readline
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys

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

if A>K:
    A -= K
    print(A, B)
    sys.exit()

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

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 permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

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

Submission status: Accepted

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

if K>=A + B:
	print ("0 0")
elif K>=A:
	print (str(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:
  b -= (k-a)
  if b < 0:
    b = 0
  a = 0
else:
  a -= k
print(' '.join(map(str, [a,b])))

Submission status: Accepted

Solution code:
abk = input().split()
a,b,k = [int(x) for x in abk]
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:
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
a -= k
if a < 0:
    b += a
    a = 0
    if b < 0:
        b = 0
print("{0} {1}".format(a, b))

Submission status: Accepted

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

a = 0
b = 0

if A <= 10**12 and B <=10**12 and K <= 10**12:
    if A >= K :
        a = A-K
        b = B
    elif  (A + B) >=K:
        a = 0
        b = B-(K-A)
    elif  (A + B)  < K:
        a = 0
        b = 0
else :
    a = 0
    b = 0

print(a,b,end='')

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

Submission status: Accepted

Solution code:
A,B,K=map(int,input().split())
ans=[0]*2

if A>=K:
  ans[0]=A-K
  ans[1]=B
else:
  ans[1]=max(0,B-(K-A))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A, B, K = list(map(int, input().split()))
nokori = K
if A > 0:
    if K <= A:
        nokori = 0
        A = A - K
    else:
        nokori = K - A
        A = 0
if nokori > 0 and B > 0:
    if nokori <= B:
        B = B - nokori
        nokori = 0
    else:
        nokori -= B
        B = 0

ans = "{} {}".format(A, B)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(A, B)

Submission status: Accepted

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

if K>=A:

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# A から Kを引く
A = A - K
# Aが負なら，その負の大きさの分だけBから引く
if A < 0:
    B = B + A
    A = 0
# Bが負なら0にする
if B < 0: B = 0

print(A,B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def t(a, b, k):
    a -= k
    b = b + a if a < 0 else b
    a = 0 if a < 0 else a
    b = 0 if b < 0 else b
    return a, b


if __name__ == '__main__':
    a, b, k = map(int, input().split())
    print('%d %d' % t(a, b, 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, A+B-K)
else:
  print(0, 0)

Submission status: Accepted

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

n = min(a,k)
a -= n
k -= n
print(a, max(b - k, 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:
T, S, K = list(map(int, input().split()))

if T - K > 0:
    print(T - K, S)
elif T - K + S < 0:
    print(0, 0)
else:
    print(0, T - K + S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp1 = K - A
tmp2= tmp1 -B
if tmp1 <= 0:
    a_out = A - K
    b_out = B
    print("{} {}".format(a_out,b_out))
    exit()
else:
    if tmp2 <= 0:
        b_out = B - tmp1
    else:
        b_out=0
    print("{} {}".format(a_out,b_out))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
ca=a-k
cb=max(min(b,b+ca),0)
ca=max(ca,0)
print('{} {}'.format(ca,cb))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
[a0,b0,k]=input().split()
a0=int(a0)
b0=int(b0)
k =int(k)
if a0>k:
    ak=a0-k
    bk=b0
else:
    ak=0
    bk=b0-(k-a0)

if bk<0:
    bk=0
    
print(ak,bk)

Submission status: Accepted

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

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

print(a, B)

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

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

Submission status: Accepted

Solution code:
a,b,k=list(map(int,input().split()))
if a>=k:
  a-=k
  print(a," ",b)
  exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(A,B)

Submission status: Accepted

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

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

print(a_ans,b_ans)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
import numpy as np
import collections

ABK = str(raw_input()).split()
A = int(ABK[0])
B = int(ABK[1])
K = int(ABK[2])


#for i in xrange(K):
#  if(A > 0):
#    A -= 1
#  elif(B > 0):
#    B -= 1

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

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

Submission status: Accepted

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

# process
ra = a
rb = b
if a < k:
    ra = 0
    k -= a
else:
    ra = a - k
    k = 0

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

# output
print(ra, rb)

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 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=input().split()
A=int(a[0])
B=int(a[1])
K=int(a[2])
if K>=A:
    K-=A
    A=0
    if K>=B:
        B=0
        print("0 0")
    else:
        B-=K
        print(str(A)+" "+str(B))
else:
    A-=K
    print(str(A)+" "+str(B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

input = [int(i) for i in stdin.readline().rstrip().split()]
A, B, K = input[0], input[1], input[2]
if A <= K:
    B = max(0, B - (K - A))
    A = 0
else:
    A -= K
print(A, B)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A,B,K = map(int,input().split())
    # 1
    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 >=K :
    print(A-K,end=' ')
    print(B)
else :
    print(0,end=' ')
    if B-(K-A) <= 0:
        print(0)
    else:
        print(B-(K-A))

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split(" "))
if A+B < K:print(0,0)
elif A > K:print(A-K,B)
elif A  <= K:print(0,A+B-K)
# Kenparさん、写経させていただきました。ありがとうございます。
# こんな解法があったなんて・・・

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

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

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt
from fractions import gcd

def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas



# N = intinput()
# S = input()
A, B, K = mulinputs()
# datas = list(mulinputs())
# datas = lineinputs(input)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(A, B)

Submission status: Accepted

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

print(A,B)

Submission status: Accepted

Solution code:
t,a,k = [x for x in list(map(int,input().split()))]
if k>=t:
    if k-t > a:
        t = 0
        a = 0
    else:
        a = a - (k-t)
        t = 0
    print(t,a)
else:
    t = t-k
    print(t,a)

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

n[0]-=n[2]

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

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split())
"""
for i in range(K):
    if(A >= 1):
        A -= 1
    elif(B >= 1):
        B -= 1
    else:
        continue
"""

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

if K-A >= 1:
    _B = B-(K-A)
print(_A,_B)
"""

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

Submission status: Accepted

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

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

print("{0} {1}".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:
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:
import os

def main():
    num_a,num_b,count = (int(x) for x in input().split())
    if count <= num_a:
        print(num_a - count,num_b)
    else:
        count -= num_a
        if count >= num_b:
            print(0,0)
        else:
            print(0,num_b - count)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

ans=[]

if A<=K:
    ans.append(0)
    if B<=(K-A):
        ans.append(0)
    else:
        ans.append(B-K+A)
        
else:
    ans.append(A-K)
    ans.append(B)
    
print(str(ans[0])+' '+str(ans[1]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

if k >= a+b: print("0 0")
else:
    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 = [int(num) for num in input().split(' ')]

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a,b,k = map(int,input().split())
"""for i in range(k):
    if a > 0: a-=1
    elif b > 0: b-= 1"""
if a>k: a,b = a-k,b
elif k <= a+b: a,b = 0,b+a-k
else: a,b = 0,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,a+b-k)
else:
    print(0,0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

Solution code:
import sys

A, B, K = [int(v) for v in sys.stdin.readline().split()]

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

if K <= A + B:
    print(0, (A + B) - K)
    sys.exit(0)

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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


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

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

else:
    print(A - K, B)

Submission status: Accepted

Solution code:
takahashi, aoki, count = map(int,input().split())
k = count
if takahashi - count >= 0:
  takahashi -= count
else:
  count -= takahashi
  takahashi = 0
  if aoki - count > 0:
    aoki -= count
  else:
    aoki = 0
print(takahashi, aoki)

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

Submission status: Accepted

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

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

B = B + A
A = 0

print(A, max(B, 0))

Submission status: Accepted

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

a, steps = a - min(a, steps), steps - min(a, steps)

b = b - min(b,steps)
print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputNums = input().split()
A = int(inputNums[0])
B = int(inputNums[1])
K = int(inputNums[2])
if K > A:
    K = K - A
    A = 0
else:
    A = A - K
    K = 0
if K > B:
    K = K - B
    B = 0
else:
    B = B - K
    K = 0
print(str(A) + " " + str(B))