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 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

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

	if A > 0:
		if A <= K:
			K = K-A
			A = 0
			#print(K)
		else:
			print("{} {}".format(A-K, B))
			sys.exit()

	#print("{} {}".format(A, B))
	if B > 0:
		if B <= K:
			print("{} {}".format(0, 0))
			sys.exit()
		else:
			print("ss")
			B = B-K
			print("{} {}".format(A, B))
			sys.exit()

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




if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
ansT=0
ansA=0
ans=0

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

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

print(t_num,a_num)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

elif (a + b) > k:
    print('0 {}'.format(a+b-k))

elif (a + b) < k:
    print('0 0')

Submission status: Wrong Answer

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


if a > k:
    print('{} {}'.format(a-k,b))

elif (a + b) > k:
    print('0 {}'.format(a+b-k))

elif (a + b) < k:
    print('0 0')

Submission status: Wrong Answer

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

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

if a <= k : 
    ansa = 0 
    ansb = b-(k-a)
else:
    ansa = a-k 
    ansb = b 
    
print("%d %d" % (ansa,ansb))

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(str(t_zan) + ' ' + str(aoki_zan))

Submission status: Wrong Answer

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

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


print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
c = int(n[0]) - int(n[2])
d=c+int(n[2])
if(c>0):
    print(c,n[1])
elif(d>0):
    print(0,d)
else:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

print(a,b,k)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B, K = MAP()

print(max(0, A-K), min(B, 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(' '.join(map(str, [a,b])))

Submission status: Wrong Answer

Solution code:
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
a -= k
if a < 0:
    b += a
    a = 0
print("{0} {1}".format(a, b))

Submission status: Wrong Answer

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

a = 0
b = 0

if A <= 10**12 and B <=10**12 and K <= 10**12:
    if A >= K :
        a = A-K
    elif  (A + B) > K:
        a = 0
        b = B-(K-A)
    elif  (A + B)  < K:
        a = 0
        b = 0


print(a,b,end='')

Submission status: Wrong Answer

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

a = 0
b = 0

if A <= 10**12 and B <=10**12 and K <= 10**12:
    if A >= K :
        a = A-K
    elif  (A + B) > K:
        a = 0
        b = B-(K-A)
    elif  (A + B)  < K:
        a = 0
        b = 0
else :
     a = 0
     b = 0

print(a,b,end='')

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

a = 0
b = 0

if A <= 10**12 and B <=10**12 and K <= 10**12:
    if A >= K :
        a = A-K
    elif  (A + B) > K:
        a = 0
        b = B-(K-A)
    elif  (A + B)  < K:
        a = 0
        b = 0
else :
     a = 0
     b = 0
     
    


print(a,b,end='')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
ans=[0]*2

if A>=K:
  ans[0]=A-K
  ans[1]=B
else:
  ans[1]=B-(K-A)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

for i in range(k):
  if a >= 1:
    a -= 1
  if b >= 1:
    b -= 1
print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
T, S, K = list(map(int, input().split()))

if T - K > 0:
    print(T - K, S)

else:
    print(0, T - K + S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A >= K:
  A = A - K
  print("高橋：",A,"青木:",B,)

elif B >= K:
  B = A + B - K
  print("高橋：",0,"青木:",B,)
    
else:
  print("高橋：",0,"青木:",0,)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print("高橋君：", A ,"枚、", "青木君：", B, "枚")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(a_ans,b_ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n, m, k = [int(s) for s in input().split()]
if k - n > 0:
  print(0, m - k + n)
else:
  print(n - k, m)

Submission status: Wrong Answer

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

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    
if __name__ == '__main__':
    main()

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

Submission status: Wrong Answer

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt
from fractions import gcd

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

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas



# N = intinput()
# S = input()
A, B, K = mulinputs()
# datas = list(mulinputs())
# datas = lineinputs(input)

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

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

x = max(A, K)
A -= x
K -= x

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

Submission status: Wrong Answer

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

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

print(A,B)

Submission status: Wrong Answer

Solution code:
t,a,k = [x for x in list(map(int,input().split()))]
if t-k < 0:
  t = 0
  k = abs(t-k)
  a = abs(a-k)
  print(t,a)
else:
  t = t-k
  print(t,a)

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

n[0]-=n[2]

if n[0]<0:
  n[1]+=n[0]
  n[0]=0
print(n[0],n[1])

Submission status: Wrong Answer

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

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

print("{0} {1}".format(a,b))

Submission status: Wrong Answer

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

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

print("{0} {1}".format(a,b))

Submission status: Wrong Answer

Solution code:
import os

def main():
    num_a,num_b,count = (int(x) for x in input().split())
    if count <= num_a:
        print(num_a - count,num_b)
    else:
        count -= num_a
        print(0,num_b - count)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

diff = abs(A - B)
a_is_higher = A > B

if K <= diff:
  if a_is_higher:
  	print(A-K, B)
  else:
    print(A, B-K)
else:
  if a_is_higher:
  	A -= diff
  else:
    B -= diff
  K -= diff
  div, mod = divmod(K, 2)
  
  if mod:
    print(A // 2, B // 2 + 1)
  else:
    print(A // 2, B // 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def greedy_takahashi(A, B, C):
    while A > 0 and B >0 and C > 0:
        if A >= 1:
            A -= 1
        elif B >= 1:
            B -= 1
        else:
            continue
        C -= 1
    print(A)
    print(B)
    
A, B, C = input().split()
A, B, C = int(A), int(B), int(C)
greedy_takahashi(A, B, C)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])

if c % 2 == 0:
    c1 = c / 2
    a = a - c1
    b = a - c1
    if (a < 0):
        a = 0
    if (b < 0):
        b = 0
else:
    c = c - 1
    c1 = c / 2
    c1 = c1 + 1
    a = a - c1
    b = b - c1
    b = b + 1
    if a < 0:
        a = 0
    if b < 0:
        b = 0

print("{} {}".format(int(a), int(b)))

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

elif A <= K:
    C = K - A
    print(0, B-C)

else:
    print(K - A, B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
if a[0] == 0 and a[1] == 0:
	print("0 0")
else:
	if a[2] > a[0]:
		a[0] = 0
		a[2] = a[2] - a[0]
		if a[2] > a[1]:
			a[1] = 0
		else:
			a[1] = a[1] - a[2]
	else:
		a[0] = a[0] - a[2]
	print(str(a[0]) + " " + str(a[1]))

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])

if not a[0] == 0 and a[1] == 0:
  for i in range(0, int(a[2])):
      if a[0] >= 1: 
        a[0] -= 1
      elif a[1] >= 1:
        a[1] -= 1
      else:
        break
print(str(a[0]) + " " + str(a[1]))

Submission status: Wrong Answer

Solution code:
inputNums = input().split()
A = int(inputNums[0])
B = int(inputNums[1])
K = int(inputNums[2])
while(K > 0):
  if (A > 1):
    A-=1
  elif (B > 1):
    B-=1
  K-=1
print(str(A) + " " + str(B))

Submission status: Wrong Answer

Solution code:
l = input().split(" ")
x = int(l[0])
y = int(l[1])
z = int(l[2])

x -= z
if x < 0:
  y += x
  x = 0
print(x, y)

Submission status: Wrong Answer

Solution code:
input1 = input()
a = int(input1.split()[0])
b = int(input1.split()[1])
c = int(input1.split()[2])

if a + b > c:
    if a >= c:
        a = a -c
        c = c - a
    else:
        c = c - a
        a = 0
    if b >= c:
        b = b - c
        c = c - b


else:
    a = 0
    b = 0

print(a,b)

Submission status: Wrong Answer

Solution code:
def takahashi(a, b, k):
	if k >= a:
		k = k - a
		a = 0
		b = b - k
		if a < 0 and b < 0:
			a = 0
			b = 0
	else:
		a = a - k
		k = 0
		if a < 0 and b < 0:
			a = 0
			b = 0

	print(a, b)

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

Submission status: Wrong Answer

Solution code:
def takahashi(a, b, k):
	if k >= a:
		k = k - a
		a = 0
		b = b - k
		print(a, b)
	else:
		a = a - k
		k = 0
		print(a, b)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

elif A<K and K-A>B:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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