Problem:


Score : 200 points

Problem Statement

Takahashi has A cookies, and Aoki has B cookies.
Takahashi will do the following action K times:

If Takahashi has one or more cookies, eat one of his cookies.

Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.

If they both have no cookies, do nothing.

In the end, how many cookies will Takahashi and Aoki have, respectively?

Constraints

0 \leq A \leq 10^{12}

0 \leq B \leq 10^{12}

0 \leq K \leq 10^{12}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

Print the numbers of Takahashi's and Aoki's cookies after K actions.

Sample Input 1

2 3 3

Sample Output 1

0 2

Takahashi will do the following:

He has two cookies, so he eats one of them.

Now he has one cookie left, and he eats it.

Now he has no cookies left, but Aoki has three, so Takahashi eats one of them.

Thus, in the end, Takahashi will have 0 cookies, and Aoki will have 2.

Sample Input 2

500000000000 500000000000 1000000000000

Sample Output 2

0 0

Watch out for overflows.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
w, x, y= input().split(" ")
a = int(w)
b = int(x)
k = int(y)

if a >= 10**12 or b >= 10**12 or k >= 10**12:
    print(0, 0)
else:
    for i in range(1, k):
        if a == 0 and b == 0:
            break

        if not a == 0:
            a -= 1
        else:
            b -= 1


    print(a, b)

Submission status: Wrong Answer

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

if a[0]<a[2]:
    if a[1]>=a[2]-a[0]:
        print(0,a[1]-a[2]+a[0])
    else:
        print(0,0)
else:
    print(a[2]-a[0],a[1])

Submission status: Wrong Answer

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

while k!=0:
  k-=1
  a-=1
  b-=1
print(a,b)

Submission status: Wrong Answer

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

if A>=K:
    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())

ans = a+b-k
print("0 "+ str(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a = 0
b = 0

c = t_a_k[0] - t_a_k[2]
d = c + t_a_k[1]
if c >= 0:
    print("{0} {1}".format(c, t_a_k[2]))
elif c < 0:
    if d < 0:
        print("0 0")
    else:
        print("0 {0}".format(d))

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b==0:
	print("0 0")
elif a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0 0")
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print("0 0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,'',b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
		
	print("0",j)

Submission status: Wrong Answer

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

print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

if c >= a + b:
    print('0' + ' ' + '0')
    exit
elif c <= a :
    a = a - c
    print(str(a) + ' ' + str(b))
elif c <= b :
    b = b - (c - a)
    print('0' + ' ' + str(b))

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b==0:
	print("0 0")
elif a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0",c-b)
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print(c-a,"0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,'',b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
		
	print("0",j)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
flag = True
while flag:
    if k <= a:
        k = 0 
        a -= k 
        break
    elif a+b >= k > a:
        b = b - (k-a)
        k = 0
        a = 0
    else:
        k = 0
        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):
    k -= a
    a = 0
    if(k>b):
        b = 0
    else:
        b -= k
print(str(a) + ' ' + str(b))

Submission status: Wrong Answer

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

if a[0]<a[2] and a[1]>=a[2]-a[0]:
    print(0,a[1]-a[2]+a[0])
elif a[0]>=a[2]:
    print(a[2]-a[0],a[1])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

li = list(map(int, input().split()))	
A = li[0]
B = li[1]
K = li[2]

d = A - K

if d < 0:
  print(0, max(0, B + d))
else:
  print(d, 0)

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout

input = stdin.readline()[:-1].split(' ')

takahashi = int(input[0])
aoki = int(input[1])
k = int(input[2])

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

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

print('{} {}'.format(takahashi, aoki))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

  print(a, b)

Submission status: Wrong Answer

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

for i in range(k):
    if(a > 0):
        a = a-1
    elif(b >0):
        b = b-1
out = [a, b]
print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout

input = stdin.readline()[:-1].split(' ')

takahashi = int(input[0])
aoki = int(input[1])
k = int(input[2])

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

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

print('{} {}'.format(takahashi, aoki))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tmp = input().split(" ")
a = int(tmp[0])
b = int(tmp[1])
k = int(tmp[2])
if k>a:#横取モード
  print(0,a+b-k)
else:
  print(a-k,b)

Submission status: Wrong Answer

Solution code:
def main(a, b, k):
    diff = abs(a - k)

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

    print(a, b)


if __name__ == "__main__":
    a, b, k = map(int, input().split())

    main(a, b, k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
flag = True
while flag:
    if k <= a:
        k = 0 
        a -= k 
        break
    elif a+b > k > a:
        b = b - (k-a)
        k = 0
        a = 0
    else:
        k = 0
        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
else:
    A = A - K

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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


def main(a, b, k):
    if a == 0 and b == 0:
        print(0, 0)

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

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

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


main(A, B, K)

Submission status: Wrong Answer

Solution code:
t, a, times = [ int(i) for i in input().split(" ")]
 
a_count = times - t
if a_count <= 0:
  print(t-times, a)
else:
  if a == 0:
    print(0, 0)
  else:
    print(0, a-a_count)

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 = input().split(" ")
a = int(a)
b = int(b)
k = int(k)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(int(a),int(b))

Submission status: Wrong Answer

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

elif A<K:
    B=B-(K-A)
    A=0
    
elif A==K:
    A=0
    
else :
    A = A-K
    

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
flag = True
while flag:
    if k == 0 or a == 0 and b == 0:
        break

    if a >= 1 and k >= a:
        a = 0
        k -= a
    elif a >= 1:
        a -= k
        k = 0
    elif b >= 1 and k >= b:
        b = 0
        k -= b
    elif b >= 1:
        b -= k
        k = 0
    else:
        break

print(a,b)

Submission status: Wrong Answer

Solution code:
def takahashi(A,B,K):
  if (A < B) & (A < K):
    B = B - (K - A)
    A = 0
  elif (A < B) & (A >= K):
    A = A - K
  elif (A >= B) & (A < K):
    B = B - (K - A)
    A = 0
  elif (A >= B) & (A >= K):
    A = A - K
  print(str(A) + " " + str(B))

info = input().split(" ")
A = int(info[0])
B = int(info[1])
K = int(info[2])
takahashi(A,B,K)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main(a, b, k):
    diff = abs(a - k)

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

    print(a, b)


if __name__ == "__main__":
    a, b, k = map(int, input().split())

    main(a, b, k)

Submission status: Wrong Answer

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


def main(a, b, k):
    if a == 0 and b == 0:
        print(0, 0)
        return

    if k < a:
        print(a - k, b)
        return

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

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


main(A, B, K)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
w, x, y= input().split(" ")
a = int(w)
b = int(x)
k = int(y)

if a >= 10**12 or b >= 10**12 or k >= 10**12:
    print(0, 0)
else:
    for i in range(1, k):
        if not a == 0:
            a -= 1
        else:
            b -= 1
            
        if a == 0 or b == 0:
            break

    print(a, b)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
flag = True
while flag:
    if k == 0:
        break
    
    if a >= 1 and k >= a:
        a = 0
        k -= a
    elif a >= 1:
        a -= k
        k = 0
    elif b >= 1 and k >= b:
        b = 0
        k -= b
    elif b >= 1:
        b -= k
        k = 0
    else:
        break

print(a,b)

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0",c-b)
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print(c-a,"0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,"",b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
		
	print("0",j)

Submission status: Wrong Answer

Solution code:

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

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

else:
    K -= A
    A = 0

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

else:
    B = 0
    
print("{} {}".format(A, B))

Submission status: Wrong Answer

Solution code:
w, x, y= input().split(" ")
a = int(w)
b = int(x)
k = int(y)

if a >= 10**12 or b >= 10**12 or k >= 10**12:
    print(0, 0)
else:
    for i in range(1, k):
        if not a == 0:
            a -= 1
        else:
            b -= 1

    print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
w, x, y= input().split(" ")
a = int(w)
b = int(x)
k = int(y)

if a >= 10**12 or b >= 10**12 or k >= 10**12:
    print(0, 0)
else:
    for i in range(0, k):
        if not a == 0:
            a -= 1
        else:
            b -= 1

    print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(a,b)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
def takahashi(A,B,K):
  if A < B & A < K:
    B = B - (K - A)
    A = 0
  elif A < B & A >= K:
    A = A - K
  elif A >= B & A < K:
    B = B - (K - A)
    A = 0
  elif A >= B & A >= K:
    A = A - K
  print(str(A) + " " + str(B))

info = input().split(" ")
A = int(info[0])
B = int(info[1])
K = int(info[2])
takahashi(A,B,K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A -= K

if A < 0:
    print(0, A+B)
else:
    print(A, max(0, B))

Submission status: Wrong Answer

Solution code:
w, x, y= input().split(" ")
a = int(w)
b = int(x)
k = int(y)

if a >= 10**12 or b >= 10**12 or k >= 10**12:
    print(0, 0)
else:
    for i in range(0, 3):
        if not a == 0:
            a -= 1
        else:
            b -= 1

    print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
t, a, k = map(int, input().split())

ans1 = 0
ans2 = 0

if k >= t + a:
    print('0 0')
elif k >= t:
    ans2 = a - k + t
    print(ans1, ans2)
else:
    ans1 = t - k
    print(ans1, ans2)

Submission status: Wrong Answer

Solution code:
#!python3

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

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


if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

print(a,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 repeat == 0:
        pass
    elif takahashi >= repeat and takahashi > 0:
        takahashi -= repeat
    elif aoki == 0:
        takahashi -= min(takahashi, repeat)
    elif takahashi == 0 and aoki >= repeat:
        aoki -= repeat
    else:
        aoki += takahashi
        aoki -= repeat
        takahashi = 0

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if K>=T+A:
  print("0 0")
else:
  if (K > T) or (A > K):
    print("0 {0}".format(A-(K-T)))
  elif (T > K):
    print("{0} {1}".format(T-K, A))
  else:
    for i in range(K):
      if T>=1:
        T -= 1
      else:
      	if A>=1:
          A -= 1
    print("{0} {1}".format(T,A))

Submission status: Wrong Answer

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

data_int = [int(data[i]) for i in range(3)]

if(data_int[0] - data_int[2] >= 0):
    print(str(data_int[0] - data_int[2]) + ' ' + str(data_int[1]))
else:
    print('0 ' + str(data_int[1] - (data_int[2] - data_int[0])))

Submission status: Wrong Answer

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

def print_ans(A,B):
        print(A,end=" ")
        print(B)


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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if a >= b:
  if 2*b<=k:
    print(a-b,0)
  else:
    bb = b - k//2
    aa = a - (k - k//2)
    print(aa,bb)
else:
  if 2*a-1 <= k:
    print(0,b-a+1)
  else:
    bb = b - k//2
    aa = a - (k - k//2)
    print(aa,bb)

Submission status: Wrong Answer

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


def main():
    (a, b, k) = map(int, input().split(" "))
    if a > k:
        print("%d %d" % (a - k, b))
    else:
        r = k - a
        print("%d %d" % (0, b - r))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b,k = [int(i) for i in input().split()]
 
if a-k>0:
    print(a-k,b)
else:
    print(0,min(0,b-(k-a)))

Submission status: Wrong Answer

Solution code:

if __name__ == "__main__":
    A, B, K = input().split()
    A = int(A)
    B = int(B)
    K = int(K)
    A = A - K
    if A < 0:
        B = B + A
        A = 0
    print(str(A) + " " + str(B))

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
flag = True
while flag:
    if a >= 1 and k >= a:
        a = 0
        k -= a
    elif a >= 1:
        a -= k
        k = 0
    elif b >= 1 and k >= b:
        b = 0
        k -= b
    elif b >= 1:
        b -= k
        k = 0
    else:
        break

print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, raw_input().split())
if (a > 0 and b > 0):
    ta = a - a
    ao = b - (k-a)
    print('{0} {1}'.format(ta, ao))
elif (a == 0 and b == 0):
    print("")

Submission status: Wrong Answer

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

if K > A+1 and K > B+1:
    print(str(0)+' '+str(0))

else:
    for i in range(K):
        if A > 0:
            A -= 1
        elif B > 0:
            B -= 1
    print(str(A)+' '+str(B))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
b = a[0] - a[2]
if b <= 0:
  ans = a[1] + b
  print('0 {}'.format(ans))
else:
  print('{} {}'.format(b, a[1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
takahashi, aoki, K = map(int, input().split())

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

Submission status: Wrong Answer

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

if K>=T+A:
  print("0 0")
else:
  if (K > T) or (A > K):
    print("0 {0}".format(A-(K-T)))
  elif (T > K):
    print("{0} {1}".format(T-K, A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0",c-b)
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print(c-a,"0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,"",b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
	print("0 ",j)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
  A,B,K= stdin.readline().rstrip().split() 

  A=int(A)
  B=int(B)
  K=int(K)

  if(A==0 and B==0):
    print(str(A)+" "+str(B))
    return

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

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

main()

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A, B, K = input().split()
C = int(K)-int(A)
D = int(K)-int(B)

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

Submission status: Wrong Answer

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

if K > A:
    print(str(0)+' '+str(0))

else:
    for i in range(K):
        if A > 0:
            A -= 1
        elif B > 0:
            B -= 1
    print(str(A)+' '+str(B))

Submission status: Wrong Answer

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

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

print("{}".format(a) + " {}".format(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:
# your code goes here
a,b,c=map(int,input().split())
if a==0 and b>0:
	if b>c:
		print("0",b-c)
	elif c>=b:
		print("0",c-b)
elif b==0 and a>0:
	if a>c:
		print(a-c,"0")
	elif c>=a:
		print("0 0")
elif a+b==c:
	print("0 0")
elif a>c:
	print(a-c,"",b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
	print("0 ",j)

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

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

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