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

Submission status: Accepted

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

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

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:
import sys
input = sys.stdin.readline

INF = float('inf')


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, K = map(int, input().split())
t = A - K
print('%d %d' % (max(t, 0), max(min(t + B, B), 0)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B, K = lr()
subtract = min(K, A)
A -= subtract
B = max(0, B - (K - subtract))
print(A, B)
# 40

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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,k=INTM()
    if k<=a:
        a=a-k
    elif k<=a+b:
        b=b-(k-a)
        a=0
    else:
        a,b=0,0
    print(a,b)
if __name__ == '__main__':
    do()

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    if A > K:
        print(' '.join(map(str, [A-K, B])))
    else:
        print(' '.join(map(str, [0, max(0, B-K+A)])))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
abk=input().rstrip().split(" ")
a=int(abk[0])
b=int(abk[1])
k=int(abk[2])
if k<=a:
    takahashi=a-k
    aoki=b
elif k>a and k<=b+a:
    takahashi=0
    aoki=a+b-k
elif k>a+b:
    aoki=0
    takahashi=0
print(takahashi, end=" ")
print(aoki)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())
if x >= z:
  print(x-z, y)
elif y >= z-x:
  print(0, y+x-z)
else:
  print(0, 0)

Submission status: Accepted

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

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

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("{} {}".format(a, b))

Submission status: Accepted

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

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

s = input().split()
t = [int(p) for p in s]

#print(t)
A = t[0]
B = t[1]
K = t[2]



a = max(0, A - K)
#print(a)

b = min(B, B - K + A)
if(b < 0):
    b = 0
#print(b)
print('{} {}'.format(a, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

    print('{} {}'.format(a, b))


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc149/tasks/abc149_b
# math
import sys
input = sys.stdin.readline
# int(input()) # 入力が1つ
# map(int, input().split()) # 入力が複数
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:
A,B,K=map(int,input().split())

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

print(ans_A,ans_B)

Submission status: Accepted

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

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

print(a, b)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(A, B)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

if b < 0:
    print(0, 0)
else:
    print(a, b)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

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


if __name__ == "__main__":
    solve()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if 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:
  print(str(a-k) + ' ' + str(b))
elif a <= k and 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())

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

A=ABK[0]
B=ABK[1]
K=ABK[2]

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

def check(A,B,K):
    if A > 0:
        if A > K:
            A-=K
            K = 0
        else:
            result = K-A
            A = 0
            K = result
    if B > 0:
        if B > K:
            B-=K
        else:
            B = 0
    return "{0} {1}".format(A,B)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

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

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

print(a,b)

Submission status: Accepted

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

out = str(A) + " " + str(B)
print(out)

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 > 0:
    if k >= b:
        k -= b
        b = 0
    else:
        b -= k

print(a, b)

Submission status: Accepted

Solution code:
import sys
import os

MOD = 10 ** 9 + 7


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

    A, B, K = list(map(int, sys.stdin.buffer.readline().split()))
    print(A-K, B) if K <= A else print(0, B-(K-A)) if K <= A+B else print(0, 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if A >= K:
    a -= K
elif A < K and B >= K - A:
    a = 0
    b -= K - A
else:
    a = 0
    b = 0
print(str(a) + " " + str(b))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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

b = 0 if k >= (a + b) else (b - k + a if k >= a else b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from fractions import gcd
from functools import lru_cache

#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

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

#############
# Main Code #
#############

A,B,K = inputIL()

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

Submission status: Accepted

Solution code:
a,b,k = [int(x) for x in 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:
a,b,k = map(int,input().split())

d = max(0,k-a)
ans_a = max(0,a-k)
ans_b = max(0,b-d)
print(ans_a,ans_b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ans_a, ans_b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,K=list(map(int,input().split()))
if A>K:
    print(A-K,B)
elif A+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))
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:
from sys import stdin
import math

a, b, k = [int(x) for x in stdin.readline().rstrip().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=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(A,' ',B)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

print("{} {}".format(aa,ba))

Submission status: Accepted

Solution code:
#スペース区切りの整数の入力
A, B ,K = map(int, input().split())

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