Problem:


Score : 200 points

Problem Statement

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

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

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

If they both have no cookies, do nothing.

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

Constraints

0 \leq A \leq 10^{12}

0 \leq B \leq 10^{12}

0 \leq K \leq 10^{12}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

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

Sample Input 1

2 3 3

Sample Output 1

0 2

Takahashi will do the following:

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

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

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

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

Sample Input 2

500000000000 500000000000 1000000000000

Sample Output 2

0 0

Watch out for overflows.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print('%d %d' % (A, B))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# B - Greedy Takahashi

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

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

print(A, B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = A - K

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    A, B, K = LI()

    taka = A
    ao = B

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

    print(taka, ao)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

if a < k:
    k -= a
    a = 0
elif a >= k :
    a -= k
    print(a ,b)
    sys.exit()

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

Submission status: Accepted

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

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:
import sys

# import math
# import bisect

# import copy
# import heapq
# from collections import deque
# import decimal

# sys.setrecursionlimit(100001)
# INF = sys.maxsize
# MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    a,b,k = ns()
    tmp= max(0, k-a)
    a = max(0, a-k)
    b = max(0,b-tmp)

    print(a,b)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    ans_a = a - k
    if ans_a < 0:
        k = ans_a * -1
        ans_a = 0
    else:
        k = k - a

    k = 0 if k < 0 else k

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

    print(ans_a, b)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = A - min(A,k)

k -= min(A,k)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(k) for k in input().split()]
#template
A,B,K = inputlist()
if A >= K:
    print(A-K,B)
else:
    print(0,max(B-K+A,0))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

else:
    print(0,0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools

def solve():
    a, b, k = map(int, input().split())
    d = min(a, k)
    a -= d
    k -= d
    d = min(b, k)
    b -= d
    k -= d
    return a, b

print(*solve())

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#N = int(input())
l = [int(x) for x in input().split()]
a = max(0,l[0]-l[2])
b = max(0,l[0]+l[1]-l[2]-a)
print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if A>=1 and K>0:
    tmp=A
    A=A-K
    K=K-tmp
if A<0:
    A=0

if A==0 and B>=1 and K>0:
    B=B-K

if B<0:
    B=0

print(A,B)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
a = int(x.split()[0])
b = int(x.split()[1])
k = int(x.split()[2])
a_result = ''
b_result = ''

if k >= a:
  a_result = '0'
  k = k -a
else:
  a_result = str(a - k)
  k = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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



main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
A, B, K = l[0], l[1], l[2]
deltaA = A - K
if deltaA < 0:
    A = 0
    deltaB = B + deltaA
    if deltaB < 0:
        B = 0
    else:
        B = deltaB
else:
    A = deltaA
print(A, B)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A -= K

if A < 0:
    B -= abs(A)
    A *= 0
    if B < 0:
        B *= 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

takahashi = max(0, a-k)
k -= a
k = max(0, k)

aoki = max(0, b-k)

print(takahashi, aoki)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, B, K = rl()

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

Submission status: Accepted

Solution code:
A,B,K=[int(x) for x in input().rstrip().split()]
import sys
# A=[int(x) for x in input().rstrip().split()]
# if A==0 and B==0:
#   print(0,0)
#   sys.exit()
ans=0
if 0<=A-K:
  print(A-K,B)
else:
  if B+(A-K)<0:
    ans=0
  else:
    ans=B+(A-K)
  print(0,ans)

Submission status: Accepted

Solution code:
import sys
a, b, k = map(int, sys.stdin.readline().split())
if a < k:
  if a + b - k >= 0:
    print(0, a + b - k)
  else:
    print(0, 0)
else:
  print(a - k, b)

Submission status: Accepted

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

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

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

print(a, b)

Submission status: Accepted

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

aa=max(0,a-k)
bb=max(0,b-(k-(a-aa)))

print(aa,bb)

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)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

elif a >= 1 and a > k:
    a -= k
    k -= a

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


print(a, b)

Submission status: Accepted

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


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

new_a = max(0, a - k);

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

a,b,k = map(int,input().split())
a1 = k-a
if a1 >=1:
  a2=b-a1
  if a2 <=0:
    a2 = 0
  a1=0
else:
  a1=a-k
  a2=b
print(a1,a2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

val1 = K-A

if val1 > 0:
    val2 = B-val1
    if val2 > 0:
        print(str(0)+' '+str(val2))
    else:
        print(str(0)+' '+str(0))
else:
    print(str(-val1)+' '+str(B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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