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):
taka, aoki, action = map(int, input().split())
 
if taka >= action:
  print(taka-action, aoki)
 
else:
  print(0, max(aoki-(action-taka, 0)))

def cookies(takahashi, aoki, action):
  for i in range(action):
    if takahashi > 0:
      takahashi -= 1

    elif aoki > 0:
      aoki -= 1
      
    else:
      break
      
  return takahashi, aoki

taka, aoki, action = int(input().split())

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

print(taka, aoki)

taka, aoki, action = map(int, input().split())
 
if taka >= action:
  print(taka-action, aoki)
  
else:
  print(0, max(taka+aoki-action, 0))

Verdicts: Runtime Error

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

a, b, k = (int(i) for i in input().split())
x=a-k
if x < 0:
    y=b+x
    if y < 0:
        print ("0 0")
        exit (0)
    print("0", y)
    exit (0)
print (x, 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()))
A = a[0]
B = a[1]
K = a[2]
taka = 0
aoki = 0
if K < B:
    taka = A
    aoki = B - K
elif K>=(A+B):
    pass
else:
    aoki = 0
    b = K - B
    taka = A - b
print(str(taka)+" "+str(aoki))

N=int(input())
S = input()
flag=0
for i in range(N-2):
  a = ""
  a = S[i] + S[i+1] + S[i+2]
  if a == "ABC":
    flag += 1
print(flag)
   

a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = A
aoki = B
if K < A:
    aoki = B
    taka = A - K
elif K>=(A+B):
    taka = 0
    aoki = 0
else:
    
    taka = 0
    b = K - A
    aoki = B - b
print(str(taka)+" "+str(aoki))

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

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

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

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


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

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


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

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


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

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

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

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

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

N,M,K=map(int,input().split())

if N<K:
  M=M-(K-N)
  N=0
else:
  N=N-K

if M<0:
  M=0
print(N,M)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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

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

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

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

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

Verdicts: Wrong Answer

Time Limit Exceeded

Time Limit Exceeded

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

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

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


A,B,K=map(int,input().split())
if (A-K)>=0:
  print(A-K,B)
elif (B-(K-A))>=0:
  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 = int(input())
b = int(input())
c = int(input())
for i in range(c):
    if(a!=0):
        a-1
    b-1


the_string = input()
a,b,c = the_string.split()
for i in range(c):
    while(a!=0):
        a-1
    b-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: 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):
x = [int(i) for i in input().split()]
ans = max(0, x[0] + x[1] - x[2])
print(ans)

x = [int(i) for i in input().split()]
ans1 = x[0]
ans2 = x[1]
if ans1 >= x[2]:
    ans1 -= x[2]
else:
    x[2] -= ans1
    ans1 = 0
    ans2 = max(0,ans2 - x[2])
print(ans1,ans2)

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 and k>=b:
  print('0 0')

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

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

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

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

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

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

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

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

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

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

if (K > A + B):
    print(0, 0)
elif (K <= A):
    print(A - K, B)
elif (K > A):
    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):
abk = input().split()
abk2 = []
for ee in abk:
    abk2.append(int(ee))

a, b, k = abk2
for ii in range(k):
    if a > 0:
        a -= 1
    else:
        b -= 1
print(a, b, k)

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

Takahashi = int(A)
Aoki = int(B)
count = int(K)

t = 0

for i in range(count):
    Takahashi = Takahashi-1
    t = t+1
    print(Takahashi)
    if t == count:
        break
    elif Takahashi < 0:
        Takahashi = 0
        Aoki = Aoki-1
        t = t+1
        if Aoki == 0:
            print(Takahashi, Aoki)
            break
    else:
        continue


print(Takahashi, Aoki)

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

Takahashi = int(A)
Aoki = int(B)
count = int(K)

t = 0

for i in range(count):
    Takahashi = Takahashi-1
    t = t+1
    if t == count:
        break
    elif Takahashi < 0:
        Takahashi = 0
        Aoki = Aoki-1
        t = t+1
        if Aoki == 0:
            print(Takahashi, Aoki)
            break
    else:
        continue


print(Takahashi, Aoki)

Takahashi, Aoki, count = input().split()

tk = int(Takahashi)
ak = int(Aoki)
c = int(count)

t = 0

if tk >= c:
    tk = tk - c

else:
    tk = 0
    c = c - tk
    if ak >= c:
        ak = ak - c
    else:
        ak = 0

print(tk, ak)

Takahashi, Aoki, count = input().split()

tk = int(Takahashi)
ak = int(Aoki)
c = int(count)

t = 0


if tk >= c:
    tk = tk - c

else:
    c = c - tk
    tk = 0
    if ak >= c:
        ak = ak - c
    else:
        ak = 0

print(tk, ak)

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

    a -= k

    if a < 0:
        return (0, b+a) if b+a > 0 else (0, 0)
    else :
        return (a, b)

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

if __name__ == '__main__':
    main()

def greedyTakahashi(a, b, k):

    a -= k

    if a < 0:
        return (0, b+a) if b+a > 0 else (0, 0)
    else :
        return (a, b)

def main():
    a, b, k = map(int, input().split())
    print(*greedyTakahashi(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:
  a1=a-k
  print(a1,b)
else:
  a1=0
  if b>=k-a:
    b1=b-(k-a)
    else:
      b1=0
    print(a1,b1)

a,b,k=map(int,input().split())
if a>=k:
  a1=a-k
  print(a1,b)
  exit
else:
  a1=0
  if b>=k-a:
    b1=b-(k-a)
    else:
      b1=0
    print(a1,b1)

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

print(max(0, a-k)+' '+max(0, a+b-k))

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

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

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().strip().split(" "))
print(A, B, K)

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

else:
    K -= A
    A = 0

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

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


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


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

else:
    K -= A
    A = 0

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

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

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

print(A, B)

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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

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


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

if A-K<=0:
	B=B+A-K
	A=0
	if B<=0:
		B=0
if A-K>0:
	B=B
	A=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 = [int(_) for _ in input().split()]
if A >= K:
    print(A-K, B)
else:
    print(0, min(0, B-(K-A)))


A, B, K = [int(_) for _ in 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):
import sys
bbn=1000000007
	
#+++++
		
def main():
	a, b, k = map(int, input().split())
	ret_a=a
	ret_b=b
	if a >= k:
		print(str(a-k)+' '+str(b))
	elif a+b >= k:
		print('0 '+str(b-k))
	else:
		print('0 0')
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

import sys
bbn=1000000007
	
#+++++
		
def main():
	a, b, k = map(int, input().split())
	ret_a=a
	ret_b=b
	if a >= k:
		print(str(a-k)+' '+str(b))
	elif a+b >= k:
		print('0 '+str(a+b-k))
	else:
		print('0 0')
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

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(i) for i in input().split()]

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

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

a = max(A - K, 0)
k = max(K - A, 0)
b = max(B - k, 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());

a = max(0, a - k);

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

  

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

a = max(0, a - k);

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

  


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

a = max(0, a - k);

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

  


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

new_a = max(0, a - k);

if new_a == 0:
  b = max(0, b - k + a);
  
print(new_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 = list(map(int,input().split()))
for i in range(K):
  if A != 0:
    A -= 1
  if A == 0 and B != 0:
    B -= 1
print('{} {}'.format(A,B))

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


a,b,k = map(int,input().split())
if k > a:
  a=0
  k-=a
  if k > b:
    b=0
  else:
    b-=k
else:
  a-=k
print(' '.join([str(a),str(b)])


a,b,k = map(int,input().split())
if k > a:
  a=0
  k-=a
  if k > b:
    b=0
  else:
    b-=k
else:
  a-=k
print(' '.join([str(a),str(b)]))

a,b,k = int(input().split())
if k > a:
  a=0
  k-=a
  if k > b:
    b=0
  else:
    b-=k
else:
  a-=k
print(' '.join([a,b])

a,b,k = map(int,input().split())
if k > a:
  k-=a
  a=0
  if k > b:
    b=0
  else:
    b-=k
else:
  a-=k
print(' '.join([str(a),str(b)]))

Verdicts: Runtime Error

Runtime Error

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 + b =<k:
    ansa=0
    ansb=0
elif k=>a:
    ansa=0
    ansb=a+b-k
else:
    ansa=a-k
    ansb=b

print(ansa + " "+ ansb)

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

print(ansa, ansb)


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


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


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

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

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

print("%d %d" %(a,b))

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

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

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

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

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

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

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

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

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

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

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

if K <= A:
  a = A - K
  b = B
elif A < K <= A + B:
  b = B + A - K

print(str(a) + ' ' + str(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 = input().split()
a, b, k = int(a), int(b), int(k)

c = a - k


if c >= 0:
  print(c, b)
else:
  d = b - c
  if d <= 0:
    print(0, d)
  else:
    print(0, 0)


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

c = a - k


if c >= 0:
  print(c, b)
else:
  d = b - c
  if d >= 0:
    print(0, d)
  else:
    print(0, 0)

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

c = a - k


if c >= 0:
  print(c, b)
else:
  d = b + c
  if d >= 0:
    print(0, d)
  else:
    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):
# coding:utf-8
import sys


def main():
  list1  = list(map(int, input().split(' '))) 
  a, b, k = list1
  
  for i in range(k):
    if a != 0:
      a = a - 1
      print(a)
    elif a == 0 and b != 0:
      b = b - 1
      print(b)
    else:
      pass
    
  print(a, b)
  
  return 0


if __name__ == '__main__':
  main()

#coding:utf-8
import sys
 
 
def main():
    list1  = list(map(int, input().split(' '))) 
    a, b, k = list1
  
    if a > k:
        a = a - k
      
    elif a + b >= k:
        b = b - (k - a)
        a = 0
        
    else:
        a = 0
        b = 0
        
    print(a, b)
    
    
  
    return 0
 
 
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, c = map(int, input().split())
while c:
  if c > a:
    c -= a
    a = 0
    b -= c
  else:
    a -= c
    c = 0
print(a, b)

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

Verdicts: Time Limit Exceeded

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

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

print(0, 0)


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

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

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

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 + B >= K:
    A = 0
    B = 0
else:   
    for i in range(0, 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 + B <= K:
    A = 0
    B = 0
else:   
    if A <= K:
        A = 0
        B = K - A
    else:
        A = A - K

print(A,B)


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

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

print(A,B)


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

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

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


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

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


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

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


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())
res = min(A,K)
A -= res
K = max(0, K-A)
res2 = min(B,K)
B -= res2

print(A,B)

# S, T = input().split()
# print(T+S)


import sys
input = sys.stdin.readline

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

print(Ar,Br)

# S, T = input().split()
# print(T+S)


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 math

# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np


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

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

# import math

# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np


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

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

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

for i in range(k):
  if a+b==k:
    a=0
    b=0
    break
  elif a > 0:
    a-=1
  elif b > 0:
    b-=1

print(a,b)

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

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(i) for i in input().split())

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

print(a+b)

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

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

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

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


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


Verdicts: Runtime Error

Accepted