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

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

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

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

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

Verdicts: Wrong Answer

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())
printf(a-min(a,k),b-min(b,a-min(a,k))

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

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

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

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

Verdicts: Runtime Error

Runtime Error

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):
class AC:
    @staticmethod
    def inputStr(char):
        return input().split(char)
    
    @staticmethod
    def inputInt(char):
        a = input().split(char)
        for i in range(len(a)):
            a[i] = int(a[i])
        return a

inp = AC.inputStr(" ")
A = inp[0]
B = inp[1]
K = inp[2]

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

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

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

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

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

if a <= k:
  if b-(k-a) > 0:
    print(0, b-(k-a))
  else:
    print(0, 0)
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):
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

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



if __name__ =='__main__':
    main()

# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

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



if __name__ =='__main__':
    main()

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

def cookie(t, s, p):
        if t > 0:
            t = t - 1
        elif s > 0:
            s = s - 1
        else:
            pass
        p -= 1
        if p > 0:
            cookie(t, s, p)
        return t, s
    
res = cookie(a, b, k)
print(res)

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

def cookie(t, s, p):
        if t > 0:
            t = t - 1
        elif s > 0:
            s = s - 1
        else:
            pass
        p -= 1
        if p > 0:
            cookie(t, s, p)
        return t, s
    
res = cookie(a, b, k)
t, s = res
print(t, s)

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

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


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

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

print(a, B)


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

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

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

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

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

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

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

print(A, end=" ")
print(B)

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

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

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

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

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

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

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

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

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):
a, b, k= map(str, input().split(" "))
for i in range(k):
    if a > 0:
        a-=1
    elif b > 0:
        b-=1
print(a, b)

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)

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(a, b)

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

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


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

print(A + " " + B)

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

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

print(A + " " + B)

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

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

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


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

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

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

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

print(str(a) + " " + str(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):
A, B, K = list(map(lambda x: int(x), input().split(" ")))
if A >= K:
  print(str(A - K) + " " + str(B))
elif A + B >= K:
  print("0 " + str(B - K))
else:
  print("0 0")

A, B, K = list(map(lambda x: int(x), input().split(" ")))
if A >= K:
  print(str(A - K) + " " + str(B))
elif A + B >= K:
  print("0 " + str(A + B - 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=map(int,input().split())
k=int(input())
for i in range (k):
  if a > 0:
    a-=1
  elif:
  	if b > 0:
      b-=1
print(a, b)

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

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



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

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


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

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



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



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

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



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


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

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())
beat = min(b,k)
b -= beat
k -= beat
aeat = min(a,k)
a -= aeat
print(a,b)

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

inpt = inpt.split(" ")
inpt = [int(i) for i in inpt]

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



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

print(A,B)


inpt = input()
 
inpt = inpt.split(" ")
inpt = [int(i) for i in inpt]
 
A = inpt[0]
B = inpt[1]
K = inpt[2]
 
if A >= K:
  A = A - K
else:
  K = K - A
  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())

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


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

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

print(A,B)

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

print(A,B)

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

print(A,B)

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

print(A,B)

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

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

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

if a-k > 0:
  print(a-k, b)
else:
  if b-k+a > 0:
    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):
taka, aoki, times= map(int,input().split())
if taka + aoki > times:
    if taka < times:
        print(0,aoki - (times - taka))
    elif taka > times:
        print(taka - times, aoki)
    else:
        print(0,0)
elif taka = times:
    print(0,aoki)
else:
    print(0,0)


taka, aoki, times= map(int,input("taka: ").split())


for i in range(times):
    if taka > 0:
        taka -= 1
    elif aoki > 0:
        aoki -= 1
    else:
        break

print(taka,aoki)

taka, aoki, times= map(int,input().split())
if taka + aoki > times:
    if taka < times:
        print(0,aoki - (times - taka))
    elif taka > times:
        print(taka - times, aoki)
    else:
        print(0,aoki)
else:
    print(0,0)

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

    a = a - k
    if a < 0:
        k = a * -1
        a = 0
    else:
        k = k - a
    
    b = b - k if b > 0 else 0

    print(a, b - k)

if __name__ == '__main__':
    main()


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

    ans_a = a - k
    if ans_a < 0:
        k = ans_a * -1
        ans_a = 0
    else:
        k = k - a

    k = 0 if k < 0 else k

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

    print(ans_a, b)

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

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

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

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

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

for i in range(K):
  if A > 0:
    A -= 1
    continue
  else:
    continue
  
  if  B > 0:
    B -= 1
    continue
  else:
    continue
  
  if A ==0 and B==0:
    continue
    
    
print(A,B)
  
 


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

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

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

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())
for i in range(k):
    if a >= 1:
        a -= 1
    elif a < 1 and b >=1:
        b -= 1
print(a,b,end=" ")

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

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

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

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

Verdicts: Time Limit Exceeded

Runtime Error

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

a,b,k=map(int,input().split())
print(max(a-k,0),max(b-max(k-a,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):
n = list(map(int, input().strip().split()))
count = 0
         
while count == n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1
    else:
        break
 
print(n[0] + " " + n[1])

n = list(map(int, input().split())
count = 0
         
while count == n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1
    else:
        break
 
print(n[0] n[1])

n = list(map(int, input().split())
count = 0
         
while count == n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1
 
print(n[0] n[1])

n = list(map(long, input().split())
count = 0
         
while count == n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1

print(n[0] n[1])

         
         

n = list(map(long, input().split())
count = 0
         
while count == n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1
    else:
        break
 
print(n[0] n[1])

n = list(map(int, input().strip().split()))
count = 0
         
while count < n[2]:
	if n[0] > 0:
    	n[0]-=1   
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1
    else:
        break
 
print(n[0] + " " + n[1])

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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


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

A,B,K=map(int,input().split())
if A>=K :
    print(A-K,B)
elif A+B>=K :
    print(0,A+B-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):
import sys
sys.setrecursionlimit(500*500)

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


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

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


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

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

a = max(A-K, 0)
K -= A - a
b = max(B-K, 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):
s=input().split()
a=int(s[0])
b=int(s[1])
k=int(s[2])
if a>=k:
    print((a-k)+" "+b)
else:
    if a+b>=k:
        print("0 "+b+a-k)
    else:
        print("0 0")



s=input().split()
a=int(s[0])
b=int(s[1])
k=int(s[2])
if a>=k:
    print(str(a-k)+" "+str(b))
else:
    if a+b>=k:
        print("0 "+str(b+a-k))
    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=map(int,input().split())
if a >= c:
  print(a-c,0)
else:
  print(0.max(a+b-c,0))

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

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

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

for i in range(c)
	if a >= 1:
    	a -= 1
    elif b>= 1:
    	b -= 1
    else:

print(a b)
        

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

Verdicts: Runtime Error

Runtime Error

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 or B or K >= 100000000000
  A = 0 B = 0 
for _ in range(K):
  if A >= 1:
    A -= 1
  elif B >= 1:
    B -= 1
  else:
    break
print(A,B)

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

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

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

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

s,t=map(str,input().split())
print(t+s)


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


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

a, b, c = map(int, input().split())
if c <= a:
    print(a-c, b)
else:
    print(0, max(b-(c-a), 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(10 ** 12)

for _ in range(k):
    if a > 0:
        a -= 1
    else:
        if b > 0:
            b -= 1

print(a, b)

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

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

if b > k:
    b -= k
else:
    b = 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())
print(" ".join(map(str,[max(0,a-k),max(0,b-max(0,a-k))])))


a,b,k = map(int,input().split())
print(" ".join(map(str,[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:
    print(a-k,b)
elif a<k<=b:
    print(0,a+b-k)
elif:a+b<=k
    print(0,0)

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

if a >= k:
    print(a-k,b)
elif a<k<=a+b:
    print(0,a+b-k)
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 = [int(x) for x in input().split(" ")]

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

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

if A >= K:
  print("{} {}".format(A-K, B))
elif A < K and A+B >= K:
  print("{} {}".format(0, (A-K/2)+(B-K/2))
else:
  print(0)


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

if A >= K:
  print("{} {}".format(A-K, B))
elif A < K and A+B >= K:
  print("{} {}".format(0, int(A-K/2+B-K/2)))
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('%i %i'%(A-K,B))
else:
  print('%i %i'%(0,max(B-(A-K),0)))

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

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


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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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):
inputNums = input().split()
A = int(inputNums[0])
B = int(inputNums[1])
K = int(inputNums[2])
while(K > 0):
  if (A > 1):
    A-=1
  elif (B > 1):
    B-=1
print(str(A) + " " + str(B))

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


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

Verdicts: Time Limit Exceeded

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

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

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

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

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

print(a, b)


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

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

t,a,k = map(int,input().split())
 
t = t-k
if t<0:
  a += t
  t = 0
if a<0:
  a = 0
print(t,a)


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

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

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

Verdicts: Wrong Answer

Accepted