TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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?

Submission attempts (in order):

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

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


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


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

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


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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K=map(int,input().split())
print(A,B,K)
if A+B<=K:
    print(0,0)
elif K>=A:
    print(0,B-K+A)
else:
    print(A-K,B)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

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


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


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    print("0 0")

if((a[0]+a[1]) != a[2])
for i in range(0, a[2]):
    if(a[0] >= 1):
        a[0] -= 1

    elif(a[1] >= 1):
        a[1] -= 1

print("%d %d"%(a[0],a[1]))   

a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    a[0] = 0
    a[1] = 0
    print("%d %d"%(a[0],a[1]))

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        print("%d %d"%(a[0],a[1]))
    elif(a[1] >= a[2]):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
        print("%d %d"%(a[0],a[1]))
    else:
        a[1] = 0
        a[0] = 0
    print("%d %d"%(a[0],a[1]))


a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    a[0] = 0
    a[1] = 0
    print("%d %d"%(a[0],a[1]))

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        print("%d %d"%(a[0],a[1]))
    elif(a[1] >= (a[2]+a[0])):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
        print("%d %d"%(a[0],a[1]))
    else:
        a[1] = 0
        a[0] = 0
    print("%d %d"%(a[0],a[1]))


a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    a[0] = 0
    a[1] = 0
    print("%d %d"%(a[0],a[1]))

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        a[2] = 0
        a[2] = a[2] - a[0]
    elif(a[1] >= a[2]):
        a[0] = 0
        a[1] = a[1] -a[2]
    else:
        a[1] = 0
print("%d %d"%(a[0],a[1]))


a = list(map(int, input().split()))

if(a[0] >= a[2]):
    a[0] = a[0] -a[2]
    a[2] = 0
     a[2] = a[2] - a[0]
elif(a[1] >= a[2]):
    a[0] = 0
    a[1] = a[1] -a[2]
else:
    a[1] = 0
print("%d %d"%(a[0],a[1]))


a = list(map(int, input().split()))

if((a[0]+a[1]) == a[2]):
    a[0] = 0
    a[1] = 0
    print("%d %d"%(a[0],a[1]))

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


a = list(map(int, input().split()))

t = a[0]-a[2]

if t<0:

    a[1] = a[1] +t
    if(a[1] < 0):
        a[1] = 0
    t = 0

print("%d %d"%(t,a[1]))


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int, input().split())
if a > 0 and a < k:
  a = 0
  K = k - a
  if b > 0 and b > K:
    b = b - K
  elif b > 0 and K >= b:
    b = 0
elif a > 0 and a >= k:
  a = a - k
  exit()
else:
  if b > 0 and b > k:
    b = b - k
  elif b > 0 and k >= b:
    b = 0
print(a, b)
  

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int, input().split())
if a-k >= 0:
    print(a-k, b)
elif b-(a-k) >= 0:
    print('0', b-(a-k))
else:
    print('0', '0')

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int, input().split())

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

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

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int,input().split())

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int(), input().split())

if A >= K:
  a = A - K
  b = B
elif A+B >= K:
  a = 0
  b = A + B - K
else:
  a = 0
  b = 0

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

A, B, K = map(int, input().split())
     
if A >= K:
  a = A - K
  b = B
elif A+B >= K:
  a = 0
  b = A + B - K
else:
  a = 0
  b = 0
     
print(str(a) + " " + str(b))

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a = list(map(int,input().split()))
A = a[0]
B = a[1]
N = a[2]

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

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

if A >= K:
  ans_A = A - K
  ans_B = B
elif A + B >= K:
  ans_A = 0
  ans_B = B - (K - A)
else:
  ans_A = 0
  ans_B = 0

print(ans_A,ans_B)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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:
  print(A B)

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)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int, input().split())
if A<K:
    A,K = 0,K-A
else:
    A,K = A-K,K-A
print(K)
if B<K:
    B=0
else:
    B-=K
print(A,B)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int,input().split())
print(max(0,A+B-K))

A,B,K = map(int,input().split())
miA = max(0,A-K)
miB = max(0,A+B-K)
if K<=A:
    miB = B
print(miA,miB)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k = map(int,input().split())

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


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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
from sys import exit
a, b, k = map(int, input().split(" "))

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

if a <= 0:
    b += a
    a = 0
print(a, b)

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

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

elif a <= 0:
    b += a
    a = 0
    print(a, b)

from sys import exit
a, b, k = map(int, input().split(" "))


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

if a <= 0:
    b += a
    a = 0
print(a, b)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,c=map(int,input().split())
print(a-c,b if a>c else 0,b-(k-a) elif b>k-a else 0,0)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k =map(int,input().split())
if a>k:
    print(a-k,b)
elif a+b>=k:
    print(0,b-k-a)
else:
    print(0,0)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, K: int):
    if A >= K:
        A = 0
        K -= A
        if B >= K:
            B = 0
        else:
            B-=K
    else:
        A -= K
    print(A,B)
    return


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

if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys


def solve(A: int, B: int, K: int):
    if A <= K:
        K -= A
        A = 0
        if B <= K:
            B = 0
        else:
            B-=K
    else:
        A -= K
    print(A,B)
    return


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

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):



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


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

    




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


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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):

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



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

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


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k=map(int,innput().split())
if a>=k:
  print(a-k,b)
elif a+b>=k:
  print(0,b-(k-a))
else:
  print(0,0)


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


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int,input().split())
T = A - K
O = 0
if T >= 0:
	print(T, 0)
	else:
      print(0,O-T)

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

if T >= 0:
    print(T, O)
elif O+T >=0:
    print(0,O+T)
else:
    print(0,0)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int, input().split())

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

else :
	a = a - k

print(a, b

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

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

else :
	a = a - k

print(a, b)

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k=map(int, input().split())
s = a-k if k<a else 0 
t = b if k<a else a+b-k
if (a-k)or(a+b-k): s,t=0,0
print('%d %d'%(s, t))

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import argparse

def make_parser():
    parser = argparse.ArgumentParser()

    parser.add_argument('A', type=int)
    parser.add_argument('B', type=int)
    parser.add_argument('K', type=int)

    args = parser.parse_args()

    return args

def main():
    args = make_parser()

    takahashi_cookie = args.A
    aoki_cookie = args.B
    iteration = args.K

    while(0 < iteration):
        if(1 <= takahashi_cookie):
            takahashi_cookie -= 1

        elif(1 <= aoki_cookie):
            aoki_cookie -= 1

        else:
            pass

        iteration -= 1

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

if __name__ == "__main__":
    main()


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

takahashi_cookie = A
aoki_cookie = B
iteration = K
     
while(0 < iteration):
    if(1 <= takahashi_cookie):
        takahashi_cookie -= 1
     
    elif(1 <= aoki_cookie):
        aoki_cookie -= 1
     
    else:
        pass
     
    iteration -= 1
     
    print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
     A,B,KT = map(str, input().spl
          it())

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

takahashi_cookie = A
aoki_cookie = B
iteration = K

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

else:
  takahashi_cookie = 0
  aoki_cookie = 0

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
S, T = input().split()
print(T+S)

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int, input().split())

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

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

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

print(A, B)


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k =map(int, input().split())

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


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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,c=map(int,input().split())
if a<=c:
  print(max(a+b-c,0))
else:
  print(a-c)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
value = input() 
list = value.split()
num = int(list[2]) - int(list[0])
print(int(list[1]) - num )

value = input() 
list = value.split()
num = int(list[2]) - int(list[0])
if num > 0 :
    print(int(list[1]) - num )
else:
    print(int(list[0]) - int(list[2]))

value = input()
list = value.split()
A = int(list[2] - list[0])
print(int(list[1]) - A)

value = input() 
list = value.split()
num = int(list[2]) - int(list[0])
num1 = print(int(list[1]) - num )

value = input() 
list = value.split()
num = int(list[2]) - int(list[0])
if num > 0 :
    print(int(list[1]) - num )
else:
    print(int(list[0]) - int(list[2]))

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int, input().split())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int, input().split())
a = min(a - k, 0)
k -= a
b = min(b-k, 0)
print(a, b)

a, b, k = map(int, input().split())
while k > 0:
  if a >= 1:
    a -= 1
  else:
    if b >= 1:
      b -= 1
    else:
      break
print(a, b)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int, input().split())
if A >= K:
  print(A-K,B)
  else:
  print(0,B-(K-A))
  

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a,b,c=int(input())
if c>=a+b:
  print(0,0)
elif a+b>c>=a:
  print(0,b-c+a)
else:
  print(a-c,b)

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int, input().split())
if A >= K:
    A -= K
else:
    A = 0
    K -= A
    if B >= K:
        B -= K
    else:
        B = 0

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
import sys

sys.setrecursionlimit(1000000000000000)


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

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



import sys

sys.setrecursionlimit(1000000000)


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

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



Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):

if __name__ == "__main__":
    A, B, K = input().split()
    A = int(A)
    B = int(B)
    for i in range(int(K)):
        if A != 0:
            A -= 0
        elif B != 0:
            B -= 1
        else:
            break
    print(str(A) + " " + str(B))


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
    if B < 0:
        B = 0
    print(str(A) + " " + str(B))


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
elif a<k and b>=K:
  print(0,b-k)
else:
  print(0,0)

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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)

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

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


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


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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K = map(int, input().split())


#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

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

if B < 0:
    B = 0

print(A, B)

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


#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

if A >= K:
    A -= K
elif A+B >= K:
    A = 0
    B -= K-A
    if B < 0:
        B = 0
elif A+B < K:
    A = 0
    B = 0

print(A, B)

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


#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

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

print(A, B)


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


#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

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

print(A, B)

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


#     if A > 0:
#         A -= 1
#     elif B > 0:
#         B -= 1

if A >= K:
    A -= K
elif A+B >= K:
    B -= K-A
    A = 0
    if B < 0:
        B = 0
elif A+B < K:
    A = 0
    B = 0

print(A, B)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k = map(int,input().split())

if k < a:
    a -= k

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



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


if k <= a:
    a -= k

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



Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print("0 0")
else:
    print(0,k-a-b)

base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b>k:
    print("0 0")
else:
    print(0,k-a-b)

base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print(0,0)
else:
    print(0,k-a-b)

base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print("0 0")
else:
    print(0,a+b-k)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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?

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

if __name__ == "__main__":
  main()
  

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

if __name__ == "__main__":
  main()
  


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

if __name__ == "__main__":
  main()
  


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k=map(int,input().split())
if k<a:
    print(a-k,b)
elif a<=k and k<b:
    print(0,b-k)
else:
    print(0,0)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A,B,K = map(int,input().split())


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

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

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

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

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

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

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

else:
  A -= K
  K = 0

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int, input().split())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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+" ")

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

Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k = map(int,input().split())

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

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

print(a,b)

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

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

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

print(a,b)

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k=map(int,input().split())
a=max(0,a-k)
b=max(0,b-(k-a))
print(a,b)

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

Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a,b,k = list(map(int,input().split(" ")))

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

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

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


Verdicts: Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
if A >= K:
    A = A - K
elif (A + B) >= K:
    B = B - K + A
    A = 0
else:
    A = B = 0

print(A, B)

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

for num in range(K):
    if(A < 1 && B < 1):
        break
    elif(A > 1):
        A -= 1
    elif(B < 1):
        B -= 1

print(A, B)


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

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

print(A, B)



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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?

Submission attempts (in order):
# -*- 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))



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


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

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

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



Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, c = input().split()
x = int(a)
y = int(b)
z = int(c)
if z >= x:
    z -= x
    x = 0

else:
    x -= z
    z = 0

if z >= y:
    z -= y
    y = 0

else:
    y -= z
    z = 0


a, b, c = input().split()
x = int(a)
y = int(b)
z = int(c)
if z >= x:
    z -= x
    x = 0

else:
    x -= z
    z = 0

if z >= y:
    z -= y
    y = 0

else:
    y -= z
    z = 0

print(str(x),str(y))


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
a, b, k = map(int , input().split())





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

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





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

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





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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
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))


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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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?

Submission attempts (in order):
A, B, K =map(int, input().split())
if K<A:
    A_after=A-K
elif K>=A:
    A_after=0
    if K-A<B:
            B_after=B-(K-A)
        elif K-A>=B:
            B_after=0
print(A_after, B_after)

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

Verdicts: Runtime Error

Accepted