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

Submission status: Wrong Answer

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

b -= k - a
a -= k

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

Submission status: Wrong Answer

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

t = K-A
A = A-K
if A<0:
    A = 0
B = B-t
if B<0:
    B = 0

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

Submission status: Wrong Answer

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

if a+b < k:
    print(0,0)
elif math.ceil(k/2)<=a and k//2<=b:
    print(a-math.ceil(k/2),b-k//2)
elif math.ceil(k/2)<=a:
    print(a-k+b,0)
elif k//2<=b:
    print(0,b-k+a)
else:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(s) for s in input().split()]
if K <= A:
  print(str(A-K)+' '+str(B))
else:
  print(str(0)+' '+str(A+B-K))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


def solve():
    if ((A - K) > 0):
        return [A - K, B]
    ans = B - (K - A)
    return [0,  ans]


print(*solve())

Submission status: Wrong Answer

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

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

print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    A, B, K = MI()

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    numbers = input().split(" ")
    takahashi = int(numbers[0])
    aoki = int(numbers[1])
    repeat = int(numbers[2])
    if takahashi >= repeat:
        takahashi -= repeat
    else:
        aoki += takahashi
        aoki -= repeat
        takahashi = 0

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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


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


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(' '.join([str(a), str(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)
else:
  print(A-K, end=" ")
  print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(A,B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

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

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)

print(0, A+B-K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a>= k:
    a=a-k
else:
    dif=k-a
    a=0    
    print(dif)
    b=b-dif
    if b<0:
        b=0
print("{0} {1}".format(a,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:
def run(a, b, k):
    ans1 = a - k
    ans2 = b
    if ans1 < 0:
        ans2 = b + ans1
        ans1 = 0
    return ans1, ans2


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split(" "))
C=K-A
if C >= 0:
    E = 0
else:
    E = C
D=B-C
if D >= 0:
    F = D
else:
    F = 0

print('{} {}'.format(E , F))

Submission status: Wrong Answer

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

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

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

print(a,b)

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

input = sys.stdin.readline

[a, b, k] = list(map(int, list(input()[:-1].split(" "))))

ta = max([0, a - k])
ao = max([0, a + b - k])


print(str(ta) + " " + str(ao))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

main()

Submission status: Wrong Answer

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

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

elif k < a:
    print(a-k, b)

Submission status: Wrong Answer

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

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:
#!python3.4.3

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

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

if b < 0:
    b=0

print(a, b)

Submission status: Wrong Answer

Solution code:
def main():
    a, b, k = [int(i) for i in input().split()]
    after_a = max(a - k, 0)
    k -= (a - after_a)
    b -= k
    print(after_a, b)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2 3 3"""
        output = """0 2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """500000000000 500000000000 1000000000000"""
        output = """0 0"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(i) for i in 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:
  t=a-k
  s=b
else:
  t=0
  s=b-k+a
print(str(t)+' '+str(s))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 高橋君A枚
# 青木君B枚
# 高橋君の行動回数K回
A, B, K = map(int, input().split())

# 高橋君がK枚以下なら全部食べる
if A <= K:
    K -= A
    A = 0
else:
    A -=K
    k = 0
    print(A, end=" ")
    print(B, end="")
    exit()
    
print(A,B,K)
    
if B >= K:
    B -= K
    K = 0
    print(A, end=" ")
    print(B, end="")
else:
    print("0 0")

Submission status: Wrong Answer

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

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

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:
import sys
A,B,K = map(int, sys.stdin.readline().split())

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

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B, K = map(int, input().split())

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


main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

AA = A
A -= min(K, A)
K -= AA
B -= K

print(A, B)

Submission status: Wrong Answer

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

if(a > 10^12 )or (b > 10^12) or (k > 10^12):
  print(0,0)
  exit()

for i in range(k):
  if(a > 0):
    a -= 1
  elif(b > 0):
    b -= 1

print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans1,ans2)

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

def solve(a, b, k):
    delta = a - k
    if delta < 0:
        b = b + delta
    print(max(0, delta), b)


if __name__ == '__main__':
    a, b, k = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b, k)

Submission status: Wrong Answer

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

if a2 < 1:
    a2 = 0
if b2 < 1:
    b2 = 0
print(a2,b2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = max(0, A - K)
b = max(0, B - (K - A))

print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("{} {}".format(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:
# 2019/12/29

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

eatenA = min(a , k)
ans1 = a - eatenA
eatenB = max(k - a, 0)
ans2 = b -  eatenB

print(ans1, ans2 )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

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

print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a >= k:
    a_ans = a - k
    b_ans = b - (a - k)

else:
    a_ans = 0
    k = k - a

    if b >= k:
        b_ans = b - k

    else:
        b_ans = 0


print(a_ans, b_ans)

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


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

Submission status: Wrong Answer

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


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

print(A,B)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(A: int, B: int, K: int):

    if A <= K:
        a = 0
        b = B-(K-A)
    else:
        a = A-K
        b = B
    print(a, b, sep=" ")
    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,c = map(int,input().split())
if a>=c:
    a-=c
    print(a,b)
else:
    b-=(c-a)
    a=0
    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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
tmpK = K - A
A = max(0, A - K)
B = max(0, B - tmpK)
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(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
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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


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

Submission status: Wrong Answer

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B, K = read_ints()
ans1 = max(A - K, 0)
ans2 = max(B - (K - A), 0)
print(ans1, ans2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    ansA = max(0, A - K)
    ansB = max(0, B - (K - A))

    print(ansA, ansB)
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,B,K = [int(x) for x in stdin.readline().rstrip().split()]

t = A
a = B

t -= min(A,K)
a -= (K-min(A,K))

print(t,a)

Submission status: Wrong Answer

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

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

    print(a, b)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
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:
a,b,k = map(int, input().split( ))

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
A,B,K=map(int,input().split())

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

print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(A - t, B - a)

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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Wrong Answer

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


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

else:
    a -= k


print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

b -= k - a
a -= k

print(max(0, a), b)

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = [int(i) for i in input().split()]
ans = max(0, x[0] + x[1] - x[2])
print(ans)

Submission status: Wrong Answer

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

print(A,B)

# S, T = input().split()
# print(T+S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
li = [int(i) for i in input().split()]
A = li[0]
B = li[1]
K = li[2]
t = 0
a = 0
if A - K < 0 :
    d = K - A
    a = B - d
else :
    t = a - K
print(t,a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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