Problem:


Score : 200 points

Problem Statement

Takahashi has A cookies, and Aoki has B cookies.
Takahashi will do the following action K times:

If Takahashi has one or more cookies, eat one of his cookies.

Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.

If they both have no cookies, do nothing.

In the end, how many cookies will Takahashi and Aoki have, respectively?

Constraints

0 \leq A \leq 10^{12}

0 \leq B \leq 10^{12}

0 \leq K \leq 10^{12}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

Print the numbers of Takahashi's and Aoki's cookies after K actions.

Sample Input 1

2 3 3

Sample Output 1

0 2

Takahashi will do the following:

He has two cookies, so he eats one of them.

Now he has one cookie left, and he eats it.

Now he has no cookies left, but Aoki has three, so Takahashi eats one of them.

Thus, in the end, Takahashi will have 0 cookies, and Aoki will have 2.

Sample Input 2

500000000000 500000000000 1000000000000

Sample Output 2

0 0

Watch out for overflows.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Accepted

Solution code:
# coding: utf-8

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

if a <= k:
    a_after = 0
    k_after = k - a
    b_after = b - k_after if b >= k_after else 0
else:
    a_after = a - k
    b_after = b

print("{} {}".format(a_after, b_after))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

    r = max(0, A + B - K)

    a = min(r, B)
    t = r - a

    print(t, a)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

elif k<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,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,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+min(0,a-k)))

Submission status: Accepted

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

main()

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:
def resolve():
    A, B, K = list(map(int, input().split()))
    taka = max(A-K, 0)
    ao = max(B-(K-A), 0) if K > A else B
    print(taka, ao)

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b, k = M()
if k >= a:
    k -= a
    a = 0
else:
    a -= k
    k = 0
if k >= b:
    b = 0
else:
    b -= k
print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC149 B - Greedy Takahashi
a,b,k = map(int,input().split())

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

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

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


print(a,b)

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)

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

Submission status: Accepted

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

s=k-a
t=k-a-b

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(str(a)+ " " + str(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)<0:
        print(0, 0)
        quit()
    print(0, B-(K-A))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

C = max(0,A+B-K)

B2 = min(C,B)
A2 = C-B2
print(A2,B2)

Submission status: Accepted

Solution code:
import numpy as np

inp = input()
A, B, K = int(inp.split(' ')[0]), int(inp.split(' ')[1]), int(inp.split(' ')[2])
  
if K>A:
  B = np.max([0, B-(K-A)])
A = np.max([0, A-K])

print(f'{A} {B}')

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

A_after = 0
B_after = 0

if A - K >= 0:
  A_after = A - K
  B_after = B

elif A + B - K >= 0:
  B_after = B - (K - A)
  
print(A_after, B_after)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys  import stdin,stdout

import bisect

import math

def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

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

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

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
        a*=a
        n=n>>1
    return r


def solve():

    a,b,c=mp()
    if c<a:
        print(a-c,b)
    else:
        print(0,end=" ")
        if b-c+a>0:
            print(b-c+a)
        else:
            print(0)



for _ in range(1):
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

a = max(A - K, 0)
K -= A - a
b = max(B - K, 0)
print(a, b)

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

tmp = min(k, a)
a -= tmp
k -= tmp
b = max(0, b - k)

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = [int(s) for s in input().split(' ')]
print(max(0, A - K), max(0, (B - max(0, K - A))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if not ( 0 <= A <= 10**12 and 0 <= B <= 10**12 and 0 <= K <= 10**12 ): sys.exit()
if not ( isinstance(A,int) and isinstance(B,int) and isinstance(K,int) ): sys.exit()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    
    input = sys.stdin.readline
    a,b,k = map(int, input().split())
    if a + b <= k:
        print(0,0)
        sys.exit()
    else:    
        if a < k:
            b = b-(k-a)
            a = 0
        else:
            a = a-k
        print(a,b)
            

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(a,b)

Submission status: Accepted

Solution code:
s,t,k = map(int,input().split())
n = s
m = t
if k<=s:
  n = n-k
  print(n,m)
elif s+t>=k>s:
  n = 0
  m = s+t-k
  print(n,m)
else:
  print(0,0)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,k = map(int, input().split())
m = k if a > k else a
a -= m
b -= min(k-m, b)
print(f'{a} {b}')

Submission status: Accepted

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

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

    a -= k

    if a < 0:
        return (0, b+a) if b+a > 0 else (0, 0)
    else :
        return (a, b)

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(after_a, after_b)

Submission status: Accepted

Solution code:
import copy
def main():
    A, B, K = map(int, input().split())
    alterK = copy.copy(K)
    K = K - A
    if K > 0:
        B = B - K
        if B <= 0:
            print('0 0')
            return
        else:
            print('0 ' + str(B))
            return
    else:
        print(str(A - alterK) + ' ' + str(B))
        return
main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

t_fin = max(0, a - k)
a_fin = max(0, b - (k - (a - t_fin)))
print('{} {}'.format(t_fin, a_fin))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(max(0,a), B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if A >= K:
    print(f'{A-K} {B}')
elif (A+B) >= K:
    print(f'0 {B-(K-A)}')
else:
    print('0 0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect

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

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

Submission status: Accepted

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

if A >= K:
    print("{} {}".format(A-K, B))
    exit()

K -= A
A = 0

if B >= K:
    print("{} {}".format(A, B-K))
    exit()

print("{} {}".format(0, 0))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = map(int, input().split())
 
d = min(A, K)
#print('d:', d)
A -= d
K -= d
d = min(B, K)
#print('d:', d)
B -= d
K -= d
 
print(A, B)

Submission status: Accepted

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

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

Submission status: Accepted

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

res_a = max(0, a-k)
res_b = max(0, b-(k-a)) if k-a>0 else b

print(res_a, res_b)

Submission status: Accepted

Solution code:
A, B, K = list(map(int, input().split(' ')))
v = max(0, A - K)
w = max(0, B - max(0, (K - A)))
print('{} {}'.format(v, w))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
inf = 10**17
mod = 10**9+7

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

x = y = 0
if a < k: x = 0
elif k < a:
    print(a - k, b)
    exit(0)
else: x = k - a

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

print(x, y)

Submission status: Accepted

Solution code:
import sys


# input = sys.stdin.readline

def main():
    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)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

if K >= A + B:
    A = 0
    B = 0

elif K >= A:
    B -= K - A
    A = 0

else:
    A -= K

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