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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
A, B ,K = list(map(int, input().split()))
for k in range(K):
  if A>0:
    A -= 1
  elif A==0 and B>0:
    B -= 1
  else:
    break
else:
  ans= str(A) + " " + str(B)
  print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
problem : ABC149
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B, K = map(int, read().decode('utf-8').split())

TA = max(A - K, 0)
AO = min(B, B - (K - A))
A0 = max(AO, 0)
print(TA, AO)

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
problem : ABC149
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B, K = map(int, read().decode('utf-8').split())

TA = max(A - K, 0)
AO = min(B, B - (K - A))
print(TA, AO)

Submission status: Wrong Answer

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

print(a,b)

Submission status: Wrong Answer

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

print(odd_a, odd_b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

x = [0]*2

x[0] = A - K
x[1] = B - (K - A)

if x[0] < 0:
  x[0] = 0
  
if x[1] < 0:
  x[1] = 0

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

Submission status: Wrong Answer

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


elif (a + b) <= k:
    a = 0
    b = 0

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
#print(a)
#print(b)
#print(k)
i = 0
#ans = [int(a),int(b)]
while i <= k:
    i += 1
    #print(i)
    if a >= 1:
        a = a-1
        #print('a='+str(a))
    elif a < 1 & b >= 1:
        b =b - 1
        #print('b='+str(b))
    else:
        break
#ans = [int(a),int(b)]
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
    k-=a
    if b > k:
        b-=k
    else:
        b = 0
print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

else:
    print(0, 0)

Submission status: Wrong Answer

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

result= [a-k,b]
if a-k <=0:
  b = b + a - k
  a = 0
elif b < 0:
  b = 0
print("{} {}".format(a,b))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
stra, strb, strk = input().split()
a = int(stra)
b = int(strb)
k = int(strk)
if a >= k :
  a = a - k
  k = 0
else:
  a = 0
  k = k - a

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
stra, strb, strk = input().split()
a = int(stra)
b = int(strb)
k = int(strk)
if a >= k :
  a = a - k
else:
  a = 0
  b = b - (a - k)
  if b < 0:
    b = 0
print("{} {}".format(a, b))

Submission status: Wrong Answer

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

    '''
    for i in range(K):
        if 1 <= A:
            A-=1
        elif 1 <= B:
            B-=1
    '''

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

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

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if k == 0:
  print("{} {}".format(a,b))
  sys.exit()

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 = [int(_) for _ in input().split()]

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
takahashi, aoki, n = [int(i) for i in input().split()]
rtaka = takahashi-n
raoki = aoki if rtaka == 0 else aoki+rtaka
print(str(max(rtaka, 0)) +" "+ str(max(raoki, 0)))

Submission status: Wrong Answer

Solution code:
import sys

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

if A >= 1000000000000 or B >= 1000000000000 or K >= 1000000000000:
    print("0 0")
    sys.exit()
else:
    for i in range(0, K):
        if A >= 1:
            A -= 1
            if A == 0:
                if B >= 1:
                    B -= 1
    
print("{} {}".format(A, B))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
#ABC149 B

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

if A>100000000000:
    print("0 0")
elif B>100000000000:
    print("0 0")
elif K>1000000000000:
    print("0 0")
else:
    i=0
    while i<K:
        if A>0:
            A-=1
            i+=1
        elif B>1:
            B-=1
            i+=1
        else:
            i+=1

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

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

print(ans1,ans2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
taka=a-c
aoki=b
if taka<0:
  taka=0
  aoki=b+a-c

print(taka,aoki)

Submission status: Wrong Answer

Solution code:
a = input().rstrip().split(' ')
b=[int(i) for i in a]
print(b)
S,T,U=b[0],b[1],b[2]
if S>U:
    S1=S-U
    print(S1,T)
elif S==U:
    print(0,T)
elif S<U and S+T>U:
    U1=U-S
    T1=T-U1
    print(0,T1)
else:
    print(0,0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for val in range(k):
	if a != 0 :
		a -= 1
		continue
	elif b != 0 :
		b -= 0
		continue
	else:
		break

print(a+b)

Submission status: Wrong Answer

Solution code:
def solve(string):
    a, b, k = map(int, string.split())
    return "{} {}".format(max(0, a - k), max(0, a - k + b))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    a, b, k = map(int, string.split())
    return "{} {}".format(max(0, a - k), max(0, a + b - k))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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:
# ABC149B - Greedy Takahashi
def main():
    A, B, K = map(int, input().split())
    if K <= A:
        print(A - K, B)
    else:
        print(0, B - (K - A))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ans = a + b - k

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

print(tans, aans)

Submission status: Wrong Answer

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

ans = a + b - k

if ans < 0:
    ans = 0

print(ans)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A > K:
    A = A - K
    print(A, end=" ")
    print(B)
    exit(0)

if K > A:
    K = K - A
    A = 0
    if K >= B:
        K = K - B
        B = 0
        print(A, end=" ")
        print(B)
        exit(0)
    if B > K:
        B = B - K
        print(A, end=" ")
        print(B)
        exit(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())
for i in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    for j in range(k-i):
      b -= 1
      if b >= 1:
        break
    break
  else:
    break
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:
  if b>=(k-a):
    print(0,b-(k-a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
  ri=raw_input().split()
  if not (len(ri) > 0):
    exit()
    #print(str(ri[1]+ri[0]))
  A=int(ri[0])
  B=int(ri[1])
  K=int(ri[2])
  if not ((A <= int(10 ** 12)) and (A >= 0)):
    sys.exit()
  if not ((B <= int(10 ** 12)) and (B >= 0)):
    sys.exit()
  if not ((K <= int(10 ** 12)) and (K >= 0)):
    sys.exit()
  if A-K < 0:
    B+=A-K
    A=0
  else:
    A-=K
  print(str(str(A)+' '+str(B)))

if __name__  == "__main__":
  try:
    main() #main
  #error IO Error
  except IOError as error:
    print("No file.")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if K//2>=A and K//2>=B:
  print('0 0')
elif K//2<=A and K//2<=B:
  if K%2 == 0: 
    X = int(K/2)
    print('{} {}'.format(A-X,B-X))
  else:
    X = int(K//2)
    print('{} {}'.format(A-X-1, B-X))
elif K//2>A:
  X = K//2 - A
  print('0 {}'.format(0,B-A-X))
else:
  X = K//2 - B
  print('0 {}'.format(A-B-X,0))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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 K >= A+1 and A+B >= K:
    _A = 0
    _B = A + B - K
else:
    _A = 0
    _B = 0

print(_A, _B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)

Submission status: Wrong Answer

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

def eat_cookie(A,B,K):
    if A == 0 and B == 0:
        return 0,0
    if A >= K:
        return A-K,B
    else:
        if B-A+K > 0:
            return 0,B-K+A
        else:
            return 0,0


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)

Submission status: Wrong Answer

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

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


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)

Submission status: Wrong Answer

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

def eat_cookie(A,B,K):
    if A > K:
        return A-K,B
    else:
        return 0,B-K+A


resultA,resultB = eat_cookie(A,B,K)
print(resultA,resultB)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Q = K - A
q = A - K
if Q < 0 :
  print (q)
if Q >= 0 :
  W = B - Q
  if W >= 0:
    print ("0",W)
  if W< 0 :
    print("0 0")

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
lst=[]
if i[0]<i[2]:
  i[0]=0
  i[1]=i[1]-(i[2]-i[0])
  if i[1]<0:
    i[1]=0
else:
  i[0]-=i[2]
lst.append(i[0])
lst.append(i[1])
print(lst)

Submission status: Wrong Answer

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

if A > K:
    print(A-K, B)
if A < K < A + B:
    print("0", A+B-K)
if A + B < K:
    print("0 0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(a, b)

Submission status: Wrong Answer

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

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

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

print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc149/tasks/abc149_a

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

tcookie = 0
acookie = 0

# KがAより大きい
if A > K :
    tcookie = K - A
    acookie = B

# KがA以下
if A <= K : 
    tcookie = 0
    # KがBより大きい
    if ( K - A ) < B:
        acookie = B - (K - A) 
    # KがB以下
    if ( K - A ) >= B:
        acookie = 0

print(str(tcookie) + " " +  str(acookie))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if (A_l < 0) and (B_l < 0):
    print(0, 0)
elif (A_l < 0):
    print(0, B_l)
elif (B_l < 0):
    print(0, 0)

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
A_l = A - K
B_l = A + B - K
print(A_l, B_l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(0, B_l)

Submission status: Wrong Answer

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

n = 0
while (A >= 1):
    A = A - 1
    n += 1
    #print(A, n)

B_l = B - (K - n)

print(A, B_l)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a = max(A - K, 0)
b = max(B - K, 0)
print("{} {}".format(a, b))

Submission status: Wrong Answer

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

a = max(A - K, 0)
print("{} {}".format(a, B - max(K - A, 0)))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
# INPUT
input = list(map(float, input().split()))

takahashi = input[0]
aoki = input[1]
num = input[2]

a = takahashi - num
b = 0
if a < 0:
  b = aoki + a
  a = 0
  if b < 0:
    b = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nums = input().split(" ")
A = int(nums[0])
B = int(nums[1])
K = int(nums[2])

"""
ここで、まずはAとKの比較を行って、Aの方が大きければその場で試行は終了
し、Kの方が大きければ、A=0となり、その差|A-K|は残りのBから引くものになる。
"""
if A >= K:
  A -= K
  print(A, end=" ")
  print(B)
else:
  K -= A
  A = 0
  B -= K
  print(A, end=" ")
  print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

elif k >= a:
  a = 0
  b = b - (k + a)

else:
  a = a - k

print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for n in range(k):
  if a > 1:
    a -= 1
  elif b > 1:
    b -= 1
  else:
    break
print(a,b)

Submission status: Wrong Answer

Solution code:
a = input()

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

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 or takahashi_cookie > 10 ** 12):
  raise ValueError("cookie must be over 0 and under 10 ** 12")

if(aoki_cookie < 0 or aoki_cookie > 10 ** 12):
  raise ValueError("cookie must be over 0 and under 10 ** 12")  
  
if(k < 0 or k > 10 ** 12):
  raise ValueError("count must be over 0 and under 10 ** 12")  

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:
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:
input = input().split()

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

if(takahashi_cookie != 0 and aoki_cookie != 0):
  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:
# coding: utf-8


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

    if action_count <= takahashi:
        takahashi = (action_count - takahashi)
    elif takahashi < action_count <= (takahashi + aoki):
        aoki = (takahashi + aoki - action_count)
        takahashi = 0
    elif (takahashi + aoki) < action_count:
        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 = (takahashi + aoki - action_count)
        takahashi = 0
    elif (takahashi + aoki) < action_count:
        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 = (takahashi + aoki - action_count)
        takahashi = 0
    else:
        takahashi = 0
        aoki = 0
    
    print(takahashi, aoki)

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