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:
# coding: utf-8


def main():
    
    takahashi, aoki, action_count = map(int, input().split(' '))

    if action_count <= takahashi:
        takahashi = action_count - takahashi
        aoki = aoki
    elif takahashi < action_count <= (takahashi + aoki):
        aoki = aoki - (action_count - takahashi)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

    return 0
    
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    
    takahashi, aoki, action_count = map(int, input().split(' '))

    if action_count <= takahashi:
        takahashi = action_count - takahashi
        aoki = aoki
    elif takahashi < action_count <= (takahashi + aoki):
        aoki -= (action_count - takahashi)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

    return 0
    
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    
    takahashi, aoki, action_count = map(int, input().split(' '))

    if action_count < takahashi:
        takahashi = action_count - takahashi
        aoki = aoki
    elif action_count <= (takahashi + aoki):
        aoki -= (action_count - takahashi)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

    return 0
    
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8


def main():
    
    takahashi, aoki, action_count = map(int, input().split(' '))

    if action_count <= takahashi:
        takahashi = action_count - takahashi
        aoki = aoki
    elif action_count <= (takahashi + aoki):
        aoki -= (action_count - takahashi)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

    return 0
    
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    print(a - min(a, k), b - (k - min(a, k)))


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if c[0]>=c[2]:
  c[0]-=c[2]
else :
  c[2]-=c[0]
  c[1]-=c[2]
  c[0]=0
print(c[0],c[1])

Submission status: Wrong Answer

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

if c[0]>=c[2]:
  c[0]-=c[2]
else :
  c[2]-=c[0]
  c[1]-=c[2]
  c[0]=0
print(c[0] , c[1])

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A,B,K = map(int, input().split())
 
while(K > 0):
  print(A,B,K)
  if A >= K:
    A -= K
    K = 0
    break
  else:
    K -= A
    A = 0
    if B >= K:
      B -= K
      K = 0
      break
    else:
      K -= B
      B = 0
      break
print(' '.join(map(str, [A,B])))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A,B,K = map(int, input().split())
 
while(K > 0):
  if A >= K:
    A -= K
    K = 0
    break
  else:
    A = 0
    K -= A
    if B >= K:
      B -= K
      K = 0
      break
    else:
      B = 0
      K -= B
      break
print(' '.join(map(str, [A,B])))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
A,B,K = map(int, input().split())
 
while(K > 0):
  if A >= K:
    A -= K
    K = 0
  else:
    A = 0
    K -= A
    if B >= K:
      B -= K
      K = 0
    else:
      B = 0
      K -= B
      break
print(' '.join(map(str, [A,B])))

Submission status: Wrong Answer

Solution code:
takahashi,aoki,count = map(int,input().split())
if count >= takahashi:
	aoki = aoki - count + takahashi
	takahashi = 0
else:
	takahashi = takahashi - count
aoki = (aoki < 0) and 0
print(takahashi,aoki)

Submission status: Wrong Answer

Solution code:
takahashi,aoki,count = map(int,input().split())
if count >= takahashi:
	aoki = aoki - count + takahashi
	takahashi = 0
else:
	takahashi = takahashi - count
print(takahashi,aoki)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

takahashi_cookie = int(input[0])
aoki_cookie = int(input[1])
k = int(input[2])

if(takahashi_cookie > 0):
  takahashi_cookie = takahashi_cookie - k
  if(takahashi_cookie < 0):
    aoki_cookie = aoki_cookie - abs(takahashi_cookie)
    takahashi_cookie = 0
    if(aoki_cookie < 0):
      aoki_cookie = 0
  
print(takahashi_cookie, aoki_cookie)

Submission status: Wrong Answer

Solution code:
# Greedy Takahashi

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

# solve
resA = max(0, A - K)
resB = max(0, B - (K - A))

# output
print(resA, resB)

Submission status: Wrong Answer

Solution code:
# Greedy Takahashi

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

# solve
res = [str(s) for s in [max(0, A - K), max(0, B - (K - A))]]

# output
print(' '.join(res))

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
abk = input().split()
abk2 = []
for ee in abk:
    abk2.append(int(ee))

a, b, k = abk2
for ii in range(k):
    if a > 0:
        a -= 1
    else:
        b -= 1
print(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:
a, b, k = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
a,b,k = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Wrong Answer

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

if(a<=c):
    p = 0
    if(b<=c-a):
        q = 0
    else:
        q = b -(c-a)
else:
    p = c-a
    q = int(b)

print(str(p) + " " + str(q))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
list = input().split(' ')
(A,B,K)=(int(list[0]),int(list[1]),int(list[2]))
if A >= K:
    A = A - K
elif 1 <= A < K:
    B = B - K + A
    A = 0
print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t_num = int(List[0])
a_num = int(List[1])
times = int(List[2])

return_zero = times - (t_num + a_num)

if return_zero <= 0:
  print("0 0")
else:
  while times >=0:
    times -= 1
    if t_num >= 1:
      t_num -= 1
    elif t_num == 0 and a_num >= 1:
      a_num -= 1
    elif t_num ==0 and a_num == 0:
      t_num = t_num
      a_num = a_num
  
  print(t_num +" "+ a_num)

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
ans1 = n[1] - n[2]
ans2 = (n[0] + n[1]) -  n[2]

if ans1 <= 0:
    ans1 = 0

if ans1 > 0:
    ans2 = n[1]
elif ans2 <= 0:
    ans2 = 0

print(ans1,ans2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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)
    print('0 ' + str(B))

Submission status: Wrong Answer

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

takahashi_cookie = A
aoki_cookie = B
iteration = K

if 0 <= takahashi_cookie - iteration:
  takahashi_cookie -= iteration
 
elif 0 <= aoki_cookie + takahashi_cookie - iteration:
  aoki_cookie = aoki_cookie + takahashi_cookie - iteration
  takahashi_cookie = 0

else:
  takahashi_cookie = 1
  aoki_cookie = 1

print(str(takahashi_cookie) + ' ' + str(aoki_cookie))

Submission status: Wrong Answer

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

takahashi_cookie = A
aoki_cookie = B
iteration = K

if 0 <= takahashi_cookie - iteration:
  takahashi_cookie -= iteration
 
elif 2 <= aoki_cookie + takahashi_cookie - iteration:
  aoki_cookie = aoki_cookie + takahashi_cookie - iteration
  takahashi_cookie = 0

else:
  takahashi_cookie = 1
  aoki_cookie = 1

print(str(takahashi_cookie) + ' ' + str(aoki_cookie))

Submission status: Wrong Answer

Solution code:
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep = ' ', end = '\n'):
    print(*var, file=sys.stderr, end = end, sep = sep)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
# from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

a, b, k = I()
m = min(a, k)
a -= m
k -= m
m = min(b, k)
b -= k
print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
taka, aoki, action = map(int, input().split())

if taka >= action:
  print(taka-action, aoki)

else:
  print(0, aoki-(action-taka))

Submission status: Wrong Answer

Solution code:
def cookies(takahashi, aoki, action):
  for i in range(action):
    if takahashi > 0:
      takahashi -= 1

    elif aoki > 0:
      aoki -= 1
      
    else:
      break
      
  return takahashi, aoki

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
A = A
B = B
if A+B==K:
  print(0,0)
else:
  for i in range(K):
    if A >=1:
      A -=1
    elif B >=1:
      B -=1
    print(A,B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a,b,k = inm()
print("{} {}".format(max(0,a-k), b-max(0,k-a)))

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
for i in range(k):
    if a > 0:
        a -= 1
    if a == 0:
        b -= 1
print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

S=max([0,A-K])
T=max([0,B-(K-A)])

print(str(S)+" "+str(T))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C=input().split()
A=int(A)
B=int(B)
C=int(C)
D=A-C
if D>0:
    print('{} {}'.format(D,B))
else:
    print('{} {}'.format(0,B+D))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split(' ')))
x = a[0]
y = a[1]
z = a[2]

if (z >= x + y): print('0 0')
else:
  if z < x: print(str(x - z) + ' ' + str(y))
  else: print('0' + ' ' + str(y - z))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(X, Y)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

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



if __name__ =='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

if len(str(a))>12 or len(str(b))>12 or len(str(k))>12:
    a = 0
    b = 0
    print(str(a),str(b))
    sys.exit()
else:
    for i in range(k):
        if a >= 1:
            a-=1
        elif a == 0 and b >= 1:
            b-=1
    print(str(a),str(b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())
"""
for i in range(k):
    if a >= 1:
        a -= 1
    elif b >= 1:
        b -= 1
print(a,b)
"""

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(aans,bans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

A, B, K = [int(x) for x in stdin.readline().rstrip().split()]

for x in range(0, K):
    if A != 0:
        A -= 1
        continue
    if B != 0:
        B -= 1
        break

print(A, B)

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

Submission status: Wrong Answer

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

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

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

if a+b<=n:
  a=0
  b=0
else:
  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 k > a:
  a=0
  k-=a
  if k > b:
    b=0
  else:
    b-=k
else:
  a-=k
print(' '.join([str(a),str(b)]))

Submission status: Wrong Answer

Solution code:
def getdata_input():
    while True:
        yield input()

def callFunc2(it):
    A0,B0,K=map(int, next(it).split())
    A=[0]
    B=[0]
    n=K//2

    A.append(min(n,A0))
    B.append(min(n,B0))

    n=K-(sum(A)+sum(B))
    
    if n>0:
        t=A0-sum(A)
        A.append(min(n, t))
        n=n-t
    if n > 0:
        t=B0-sum(B)
        B.append(min(n,t))
    return(" ".join([str(A0-sum(A)), str(B0-sum(B))]))
  
it=getdata_input()
print(callFunc2(it))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

a,b,k=map(int,input().split(" "))
if len(str(a)) > 12 or len(str(b)) > 12 or len(str(k)) > 12:
  a=0
  b=0
  print(str(a),str(b))
  sys.exit()

else:
    A,B=check(a,b,k)
    print(str(A),str(B))

Submission status: Wrong Answer

Solution code:
import sys

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

a,b,k=map(int,input().split(" "))
if len(str(a)) > 12 or len(str(b)) > 12 or len(str(k)) > 12:
  a=0
  b=0
  print(str(a),str(b))
  sys.exit()

else:
    A,B=check(a,b,k)
    print(str(A),str(B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if k < a:
    a -= k

elif a < k < a+b:
  a = 0
  b =b-(k - a)
elif k >= a+b:
  a = 0
  b = 0
    
    
print("{} {}".format(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lst = list(map(int,input().split()))
a = lst[0]-lst[2]
ans1 = max(a, 0)
ans2 = lst[1] + min(0, a)
print(str(ans1) + " " + str(ans2))

Submission status: Wrong Answer

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

if K >= 10**12:
  print(0,0)
else:
  for i in range(K):
    if A >= 1:
      A -= 1
    elif B >= 1:
      B -= 1
  print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B - Greedy Takahashi

A, B, K = [int(x) for x in input().split()]
if A >= K:
    A = 0
    K = 0
else:
    K -= A
    A = 0
if B <= K:
    B = 0
else:
    B -= K
print(A, B)

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

Submission status: Wrong Answer

Solution code:
a,b,c=[int(x) for x in input().split()]
y=c-a
if y>=0:
	a=0
z=b-y
if z>=0:
	b=z
else:
	b=0
print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if sum > K:
    print(0,sum - K)
else:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = a - k

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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