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: Wrong Answer

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

if A + B >= K:
    A = 0
    B = 0
else:   
    for i in range(0, K):
        if A >= 1:
            A -= 1
        elif B >= 1:
            B -= 1
        else:
            break

print(A,B)

Submission status: Wrong Answer

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  i=0
  j=j-k+i
else:
  i=i-k
print(str(i)+" "+str(j))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import fractions

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

Submission status: Wrong Answer

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

a -= k

if a <= 0:
    b += a
    a = 0

print(a, b)

Submission status: Wrong Answer

Solution code:
T, A, time = map(int, input().split())

if time >= T:
    timeleft = time - T
    if timeleft > 0:
        T=0
        A -= timeleft
else:
    T-=time
print(str(T)+" "+str(A))

Submission status: Wrong Answer

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

b1 = A - K

o1 = b1 if (b1 > 0) else 0

b2 = -b1

o2 = B - b2 if (b2 > 0) else B

o3 = B - b2 if (o2 > 0) else 0

o = str(o1) + " " + str(o3)

print(o)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a >= k:
    a = a-k
else:
    b = b-(k-a)
    a = 0
print("{} {}".format(a,min(0,b)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10000000)
a, b, k = map(int, input().split())

if k > a and k > b:
    print(0, 0)
else:
    for i in range(0, k):
        if a >= 1:
            a = a - 1
        elif b >= 1:
            b = b - 1
        else:
            pass
    print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

print(ans_a, ans_b)

Submission status: Wrong Answer

Solution code:
temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]
if k > 0:
  if k <= a:
    a = a - k
  else:
    a = 0
    k = k - a
    if k <= b:
      b = b - k
    else:
      b = 0

print(str(a)+' '+str(b))

Submission status: Wrong Answer

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

if(A>K):
    print("{} {}".format(K-A,B))
else:
    if(B-K+A)>0:
        print("{} {}".format(0,B-K+A))
    else:
        print("0 0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# abc149/abc149_b
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    A, B, K = i2nn()
    if (A > K):
        print(A - K, B)
    else:
        print(0, B + A - K)
    return

main()

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
N = a[2]

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

Submission status: Wrong Answer

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

first_a = a
a -= k if k < a else a
k -= first_a if a == 0 else 0
b -= 0 if a != 0 else k

print(a, end=" ")
print(b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

  
Lists=[ans1,ans2]
print(*Lists)

Submission status: Wrong Answer

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

print(A,B)

Submission status: Wrong Answer

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

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

print(str(a1) + ' ' + str(b1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m,l=map(int,input().split())
l-=n
if n>=l:
    n=0
    m-=l
print(n,m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0, K):
    if(A>0):
        A -= 1
    if(B>0 and A==0):
        B -= 1
        break
print(A, B)

Submission status: Wrong Answer

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

#loop the action
for i in range(K):
    if A >= 1:
        A = A-1
    elif B >= 1:
        B = B-1
        break
    elif A and B == 0:
        break

print(A, B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else :
	a = a - k

print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if n>a:
  b-=(n-a)
  a=0
  if b<0:
    b=0
else:
  a=n-a

print("%d %d" %(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

first_a = a
a -= k if k < a else a
k -= first_a if a == 0 else 0
b -= k

print(a, end=" ")
print(b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(a, b)

Submission status: Wrong Answer

Solution code:
n = input()    
m = n.split()
p = [int(i) for i in m]
if p[0] > p[2]:
    print(str(p[0]-p[2])+" "+str(p[1]))
else:
    print("0 "+str(p[1]+p[0]-p[2]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
ansa = 0 
ansb = 0
if a[2] < a[0]:
    absb = a[1]
    ansa = a[0]-a[2]
elif a[1]> a[2]-a[0]:
    ansb = a[1]-(a[2]-a[0])
    ansa = 0
else:
    ansa = 0
    ansb = 0
print (str(ansa)+" "+str(ansb))

Submission status: Wrong Answer

Solution code:
inpt = input()

inpt = inpt.split(" ")
inpt = [int(i) for i in inpt]

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



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

print(A,B)

Submission status: Wrong Answer

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


if A==B:
    print(A,end=" ")
    print(B)
else:
    least = min(A,B)
    more = max(A,B)
    K-=least
    if K:
        more-=K
    if min(A,B)==A:
        print("0",end=" ")
        print(more)
    else:
        print(more,end=" ")
        print("0")

Submission status: Wrong Answer

Solution code:
cookies = [int(x) for x in input().split()]
leftOver = cookies[0] - cookies[2]
takahashi = max(0, leftOver)
print(str(takahashi)+ ' ' + str(cookies[1]) if takahashi > 0  else str(max(0,cookies[1] - abs(leftOver))))

Submission status: Wrong Answer

Solution code:
in_li = list(map(int,input().split()))
A = in_li[0]
B = in_li[1]
K = in_li[1]

for i in range(K) :
    if A != 0 :
        A -= 1
    elif B != 0 :
        B -= 1
    else :
        pass
print(A,"",B)

Submission status: Wrong Answer

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

for _ in range(k-a):
  if b >= 1:
      b -= 1
  else:
    pass
  
print(0, b)

Submission status: Wrong Answer

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

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

print(a, end="")
print(" ", end="")
print(b)

Submission status: Wrong Answer

Solution code:
temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]

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

print(str(a)+' '+str(b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a <= k:
  resa = 0
else:
  resa = a - k

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


print(str(resa) + " " + str(resb))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(0, 0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

C = int(K)-int(A)
B = int(B)-C

print(str(C) +" "+ str(B))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(max(A - K, 0), end = " ")

K -= A

print(max(B - K, 0))

Submission status: Wrong Answer

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

t = -(-K // 2)
a = K // 2

result1 = A-t
result2 = B-a

if result1 < 0 :
  result1 = 0
if result2 < 0 :
  result2 = 0

print(result1, result2)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

print(a, b)

Submission status: Wrong Answer

Solution code:
# 1行目の入力を空白で分割された数値として扱う
A, B, K = map(int, input().split())

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

# 答えの出力
print(str(A) + " " + str(B))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

x = list(map(int, input().split()))

if x[2] >= x[0] and x[0] >= 1:
	x[2] -= x[0]
	x[0] = 0

	if x[2] >= x[1] and x[1] >= 1:
		x[1] = 0
	else:
		x[1] -= x[2]

elif x[2] < x[0] and x[0] >= 1:
	x[0] -= x[2]

elif x[0] == 0 and x[1] == 0:
	pass


print(str(x[0]) + " " + str(x[1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = (int(i) for i in input().split())
x=a-k
if x < 0:
    y=b+x
    print("0", y)
    exit (0)
print (x, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC149 B
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
a,b,k=map(int, input().split())

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

if k>0:
    if b>=k:
        b-=k
    elif b<k:
        b=0
# if b<k:
#     b=0
# elif b>=k:
#     b-=k

print(a,b)

Submission status: Wrong Answer

Solution code:
str=input().split(" ")

a = int(str[0])
b = int(str[1])
c = int(str[2])

taka = a - c
if taka < 0:
    taka = 0
ao = b - c + a
if ao < 0:
    ao = 0

print(taka, end = " " )
print(ao)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

flag = True
while flag:
    if A > 0:
        A = A - 1
    elif B > 0:
        B = B - 1
        flag = False
    else:
        flag = False

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

if n>a:
  a=0
  b-=(n-a)
  if b<0:
    b=0
else:
  a=n-a

print("%d %d" %(a,b))

Submission status: Wrong Answer

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

if (a==b):
    print(0,0)
else:
    for i in range(k):
        if 1<=a:
            a-=1
        elif 1<=b:
            b-=1
    print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print([A, B])

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B, K = map(int, input().split())
if K >= A:
  B = B-(K-A)
  A = 0
else:
  A = A-K
print("{} {}".format(A,B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = list(map(int, input().split()))

if n[0] > 0:
    if n[2] >= n[0]:
        n[2] -= n[0]
        n[0] = 0
        n[1] -= n[2]
    else:
        n[0] -= n[2]
else:
    for i in range(n[2]):
        if n[0] > 0:
            n[0] -= 1
        elif (n[0] == 0) and (n[1] > 0):
            n[1] -= 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ak = k-a

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

Submission status: Wrong Answer

Solution code:
T, A, time = map(int, input().split())

timeleft = time - T
if timeleft > 0:
    T=0
    A -= timeleft
print(str(T)+" "+str(A))

Submission status: Wrong Answer

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


ans = [A,B]
if A+B <= K:
  ans = [0,0]
elif A<=K:
  ans[0] = 0
  ans[1] = B-(K-A)
else:
  ans[0] = K-A


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

Submission status: Wrong Answer

Solution code:
# coding:utf-8
import sys


def main():
  list1  = list(map(int, input().split(' '))) 
  a, b, k = list1
  
  for i in range(k):
    if a != 0:
      a = a - 1
      print(a)
    elif a == 0 and b != 0:
      b = b - 1
      print(b)
    else:
      pass
    
  print(a, b)
  
  return 0


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(A,B)

Submission status: Wrong Answer

Solution code:
# 1行目の入力を空白で分割された数値として扱う
A, B, K = map(int, input().split())

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

# 答えの出力
print(str(A) + " " + str(B))

Submission status: Wrong Answer

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

print(A,B)

Submission status: Wrong Answer

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

if k>a:
    b=b - (k-a)
    a=0

else:
    a = a-k
print(a,b)

Submission status: Wrong Answer

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

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

    print(a, b)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
	a,b,k = map(int,input().split())
	# n = int(input())
	# s = str(input())
	# h = list(map(int,input().split()))
	# l = [list(map(int, input().split())) for _ in range(n)]
	# s = list(s)

	if k-a >= 0:
		takahashi = 0
		nokori = k-a
		aoki = b - (k-a)
	else:
		takahashi = a-k
		aoki = b

	l = []
	l.append(takahashi)
	l.append(aoki)
	# print(l)
	print(' '.join(map(str, l)))

	


if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
line = input().split(" ")

a = int(line[0])
b = int(line[1])
k = int(line[2])

takahashi = 0
aoki = 0

if k <= a:
    takahashi = a - k
    aoki = b
else:
    aoki = a + b - k

print(str(takahashi) + " " + str(aoki))

Submission status: Wrong Answer

Solution code:
t, a, times = [ int(i) for i in input().split(" ")]

a_count = times - t
if a_count <= 0:
  print(t-times, a)
else:
  print(0, a-a_count)

Submission status: Wrong Answer

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

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

print(0, A+B-K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0,K):
    if(A>0):
        A -= 1
    if(B>0 and A==0):
        B -= 1
        print(A, B)
        break

Submission status: Wrong Answer

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

if(k >= a):
    a1=0
    a2 = b - (k-a)
else:
    a1 = a-k
    a2 = b

print(a1, a2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

N = A+B-K

if N <=0:
    print('0 0')
elif N < B:
    print('0 %d' %N)
else:
    print('%d %d' %(A-N,B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(A: int, B: int, K: int):
    t = max(0, A-K)
    a = B
    if A-K > 0:
        a = B
    else:
        a -= max(0, K-A)

    print(t, a)
    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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A-=X
K-=X
B-=K

print(A,B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


# if __name__ == '__main__':
main()

Submission status: Wrong Answer

Solution code:
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(2, 3, 3), (0, 2))

    def test_2(self):
        self.assertEqual(think(500000000000, 500000000000, 1000000000000), (0, 0))


def solve():
    a, b, k = read()
    result = think(a, b, k)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b, k):
    if a >= k:
        return a - k, b
    rem = k - a
    return 0, b - rem


def write(result):
    print('{0:d} {1:d}'.format(result[0], result[1]))


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Wrong Answer

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

if(A>K):
    print("{} {}".format(K-A,B))
else:
    print("{} {}".format(0,B-K+A))

Submission status: Wrong Answer

Solution code:
import numpy as np

x = list(map(int, input().split()))

if x[2] >= x[0] and x[0] >= 1:
	x[2] -= x[0]
	x[0] = 0

	if x[2] >= x[1] and x[1] >= 1:
		x[1] = 0
	else:
		x[1] -= x[2]

elif x[2] < x[0] and x[0] >= 1:
	x[0] -= x[2]


print(str(x[0]) + " " + str(x[1]))