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

x = a-k
y = a + b -k

if a >= k:
  print('{} {}'.format(x, b))
elif b >= k-a:
  print('{} {}'.format(0, y))
else:
  print('{} {}'.format(0, 0))

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**5)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, b, k = geta(int)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func(A, B, K):
    if K >= A + B:
        ans1, ans2 = 0, 0
    else:
        if K >= A:
            ans1, ans2 = 0, A + B - K
        else:
            ans1, ans2 = A - K, B
    return ans1, ans2


if __name__ == "__main__":
    A, B, K = map(int, input().split())
    print(*func(A, B, K))

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int, K: int):
    a = 0 if A < K else A - K
    b = max(A + B - K, 0) if A < K else B
    print(str(a) + ' ' + str(b))
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,K = 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:
#!/usr/bin/env python3
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    A, B, K = map(int, readline().split())
    t = max(A - K, 0)
    a = min(A + B - K, B)
    a = max(a, 0)
    print(t, a)


if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode('utf-8')

#2211
#import numpy as np

def main():
	a,b,k=MI()

	a1=max(0,a-k)
	a2=min(b,max(0,a+b-k))

	print(a1,a2)



if __name__ == "__main__":
	main()

Submission status: Accepted

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

if A <= K:
    answer_A = 0
    answer_B = max(0, B - (K - A))
elif A > K:
    answer_A = A - K
    answer_B = B
print(answer_A, answer_B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
a = x[0] - x[2]
b = x[1]
c = x[2] - x[0]
if a <= 0:
  a = 0
if a <= 0 and b >= 0:
  b -= c
if b <= 0:
  b = 0
print(str(a)+' '+str(b))

Submission status: Accepted

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

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

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(str(A) + ' ' + str(B))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,k = map(int, raw_input().split(' '))
r = [a,b]
for i in range(len(r)):
	if k >=0:
		m = min(k,r[i])
		r[i] -= m
		k -= m

print '{} {}'.format(r[0],r[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = list(map(int,input().rstrip().split()))
ans = [0]*2
ans[0] = max(0,A-K)
ans[1] = min(B,max(A+B-K,0))
print(*ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
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 -= K
elif A+B >= K:
    B -= K-A
    A = 0
    if B < 0:
        B = 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 K <= A:
    A -= K
else:
    A, B = 0, max(0, B-K+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 > 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 + 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())
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:
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())

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

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int, K: int):
    a = A - min(A, K)
    K -= min(A, K)
    if K:
        B -= min(B, K)
    print(a, B)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, k = map(int, input().split())
print(max(0, a-k), max(0, min(b-k+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 K<A+1:
    st1 = (str(A-K))
    st2 = str(B)
    result = [st1, st2]
    print(' '.join(result))
elif K<A+B:
    st1 = (str(0))
    st2 = str(A+B-K)
    result = [st1, st2]
    print(' '.join(result))
else:
    st1 = (str(0))
    st2 = str(0)
    result = [st1, st2]
    print(' '.join(result))

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

A,B,K=nm()

eat_A=min(K,A)
K-=eat_A
A-=eat_A
eat_B=min(K,B)
K-=eat_B
B-=eat_B

ans=[A,B]
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans_A, ans_B)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
a,b,k=map(int,stdin.readline().split())
if(k>=a):
    print(0,max(0,b-k+a))
else:
    print(a-k,b)

Submission status: Accepted

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

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

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

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-(abs(A-K))))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    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)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:

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

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

print(A, B)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(A, B)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(a, b, k):
    #print('%d %d %d' % (a, b, k))
    if k < a:
        a -= k
        k = 0
    else:
        k -= a
        a = 0
    #print('%d %d %d' % (a, b, k))
    if k < b:
        b -= k
        k = 0
    else:
        k -= b
        b = 0
    return (a, b)

def main():
    a, b, k = map(int, input().split())
    ans = solve(a, b, k)
    print('%d %d' % (ans[0], ans[1]))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A,B,K = map(int,input().split())
result = [0]*2
result[0] = max(0,A-K)
result[1] = max(0,min(B-(K-A),B))
print(*result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

B -= min(B, K)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve(a,b,k):
  if a - k >= 0:
    return a-k,b
  elif a + b - k >= 0:
    return 0,a+b-k
  else:
    return 0,0

print(*solve(A,B,K))

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

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect
import itertools
import heapq


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(input):
    [takahashi, aoki, count] = string_to_int(input)

    if count > takahashi:
        count -= takahashi
        takahashi = 0
    else:
        takahashi -= count
        count = 0
        return "{} {}".format(takahashi, aoki)

    if count > aoki:
        return "0 0"
    else:
        aoki -= count
        return "{} {}".format(takahashi, aoki)


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(input())
    print(ret)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fileinput

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

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

Submission status: Accepted

Solution code:
a,b,k = (int(i) for i in input().split())
e = min(a,k)
a-=e
k-=e
b-=min(b,k)
print(a,b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input().split()
 
a = int(x[0])
b = int(x[1])
k = int(x[2])
 
if(a-k > 0):
  print(a-k,b)
  exit()
elif(a-k == 0):
  print(0,b)
  exit()
elif(a-k < 0 and b-(k-a) > 0):
  print(0,b-(k-a))
  exit()
elif(a-k < 0 and b-(k-a) == 0):
  print(0,0)
  exit()
elif(a-k < 0 and b-(k-a) < 0):
  print(0,0)
  exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 14:34:05 2020

@author: shinba
"""

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)