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


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

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

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


Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
a,b,c = input().strip().split
a,b,c = [int(a), int(b), int(c)]

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

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

a,b,k = input().strip().split()
a,b,k = [int(a), int(b), int(k)]

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

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


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


a,b,c=input().split()
while(c>0):
  while(a>0):
    a-=1
  while(b>0):
    b-=1
print(a," ",b)
  

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

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


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


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


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


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


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

a, b, k = 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(str(a)+" "+str(b))

a, b, k = 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(str(a)+" "+str(b))

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


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

if (A+B) - K <= 0:
    Ta=0
    Ao=0
else:
    if A < B:
        Ta = (A+B) - K
        Ao = 0
    else:
        Ao = (A+B) - K
        Ta = 0

    
print(f"{Ta} {Ao}")

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):
import sys
row = sys.stdin.readline
 
def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)
 
result_A = 0 if A <= K else A-K
result_B = max(B -(K-A)) if A <= K else B
print(result_A,result_B)

import sys
row = sys.stdin.readline
 
def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)
 
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(str(a-k) + str(b))
elif a+b>=k:
  print(str(0) + str(a+b-k)
elsem
        print(0 0)

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

tasks -= min(tc, ac)
ac -= min(tc, ac)
tc -= min(tc, ac)

while tasks > 0:
  if tc > 0: tc -= 1
  if ac > 0: ac -= 1
  tasks -= 1
  
print(tc, ac)


tc, ac, tasks = map(int, input().split())

while tasks > 0:
  if tc > 0: tc -= 1
  if ac > 0: ac -= 1
  tasks -= 1
  
print(tc, ac)

tc, ac, tasks = map(int, input().split())

tasks -= tc
ac -= tc
tc = 0

if ac < 0:
  tc += abs(ac)
  ac += abs(ac)
  
print(tc, ac)


tc, ac, tasks = map(int, input().split())

if tasks >= (tc + ac): tc, ac = 0,0
else:
  if tc >= tasks: tc -= tasks
  else: tc,ac = 0,ac + tc - tasks


print(tc, ac)

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


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

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


1 3 1000
0 1

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



def solve(a,b,k):
    if a==0 and b==0:
        return '0 0'
    if a>=k:
        str = '%d %d' % (a-k,b)
        return str
    else:
        b = b + a - k
        a = 0
        if b<0:
            return '0 0'
        str = '0 %d' % (b)
        return str 
        

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



Verdicts: Runtime Error

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

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

  
  
    

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


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

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

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

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

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

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

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


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

print(A, B)


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


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

print(A, B)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  i=0
  j=j-k+i
else:
  i=i-k
print(str(i)+" "str(j))

s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  i=0
  j=j-k+i
else:
  i=i-k
print(str(i)+" "+str(j))


s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  i=0
  j=j-k+i
  if j<0:
    j=0
else:
  i=i-k
print(str(i)+" "+str(j))


s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  j=j-(k-i)
  i=0
  if j<0:
    j=0
else:
  i=i-k
print(str(i)+" "+str(j))

Verdicts: 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):
s = [input() for i in range(3)]
A = s[0]
B = s[1]
K = s[2]
 
for j in range(K):
  if A >0:
    A -= 1
  elif B >0:
    B -= 1
  else:
    break
 
print(A)
print(B)

s = [input() for i in range(3)]
A = s[0]
B = s[1]
K = s[2]

for j in range(K):
  if A >0:
    A -= 1
  elif B >0:
    B -= 1
  else:
    break

print(A, B)

s = input().split()
A = s[0]
B = s[1]
K = s[2]
 
for j in range(K):
  if A >0:
    A -= 1
  elif B >0:
    B -= 1
  else:
    break
 
print(A, B)

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

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

print(A, B)

Verdicts: 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+b < k:
  print('0 0')
elif a < k:
  print('{} {}'.format(0, a+b-k))
elif:
  print('{} {}'.format(a-k, b)) 


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

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

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

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

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

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

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

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

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

a, b, k = list(map(int, input().split()))
if 0 <= a <= k:
    a, k = 0, k - a
    if 0 <= b <= k:
        b = 0
    else:
        b -= k
else:
    a -= k
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):
import sys
A, B, K= map(int, sys.stdin.buffer)
x = min(A, B, K)
print(A - x, B - x)

import sys
A, B, K= map(int, next(sys.stdin.buffer))
x = min(A, B, K)
print(A - x, B - x)

import sys
A, B, K= map(int, next(sys.stdin.buffer).split())
if K > A:
  a = 0
  b = max(0, B - (K - A))
else:
  a = A - K
  b = B

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

r=input().split()
A=int(r[0])
B=int(r[1])
K=int(r[2])
if K>=A+B:
    print("0 0")
elif K>=A:
    print("0 "+str(B-K+A))
else:
    print(str(A-K)+" "+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):
def main():
    A, B, K = map(int, input().split())
    print(max([A + B - K, 0]))


if __name__ == "__main__":
    main()


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


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):
def actual(a, b, k):
    if a >= k:
        return (a - k), b

    return 0, b - (k - a)

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

def actual(a, b, k):
    if a >= k:
        # return f'{a - k} {b}'
        return '{} {}'.format((a - k), b)

    if b > (k - a):
        # return f'0 {b - (k - a)}'
        return f'0 {}'.format(b - (k - a))

    return '0 0'

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

def actual(a, b, k):
    if a >= k:
        # return f'{a - k} {b}'
        return '{} {}'.format((a - k), b)

    if b > (k - a):
        # return f'0 {b - (k - a)}'
        return '0 {}'.format(b - (k - a))

    return '0 0'

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


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

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

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

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

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

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

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

for i in range(K):

  if K>=A and K>=B:
    A=0
    B=0
    break
  elif A>=1:
    A=A-1
  elif B>=1:
    B=B-1
  elif A==0 and B==0:
    break

print(A,B)

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

for i in range(K):

  if K>=A and K>=B:
    A=0
    B=0
  elif A>=1:
    A=A-1
  elif B>=1:
    B=B-1
  elif A==0 and B==0:
    break

print(A,B)

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

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

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):
s = input()
a, b, k = s.split()
a, b, k = int(a), int(b), int(c)

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

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


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


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

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

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


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


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

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


a,b,k=map(int,input().split())
if a==k:
  print('0',b)

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

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


a,b,k=map(int,input().split())
if a==k:
  print('0',b)

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

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


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

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

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
A,B,K = map(int, input().split())
while K >=0:
    if A >= 1:
        A = A - 1
    elif B >= 1:
        B = B - 1
    elif (A == 0 and B == 0):
        continue
    K = K -1
print(A, B)

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

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

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

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

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

for TIMES in range(K):
    if cA > 0:
        cA=cA-1
        print(TIMES)
    elif cB > 0:
        cB=cB-1
        print(TIMES)
    else:
        break

print(str(cA) + " " + str(cB))

STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])

cA = A
cB = B

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

print(cA,cB)

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

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

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

else:
  a = 0
  b = 0
  print(str(a)+" "+str(b))

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

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

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

else:
  a = 0
  b = 0
  print(str(a)+" "+str(b))

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

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

import sys
import math
import fractions
import itertools
from collections import deque
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()

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

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

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

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

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

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

Verdicts: 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(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

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


import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

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

t,a,k = map(int, input().split())
T = max(t - k,0)
k-=t-T
A = max(a - k,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().spit())
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,B,K = map(int,input().split())

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


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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
a,b,c = int(input().split())
 
for i in range(c):
  if(a == 0 and b > 0):
  	b -= 1
  elif(a > 0):
    a -= 1
print(str(a),str(b))

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

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

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


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

for i in range(c):
  if(a == 0):
  	c -=1
  elif(a > 0):
    a -= 1
print(str(a),str(b))
    


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


Verdicts: Runtime Error

Wrong Answer

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

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

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

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


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

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

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
a, b, k = map(int, input().split())
if (a ==0 and b == 0) or a + b == k:
    print('0 0')

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

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

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

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

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

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

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

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

Verdicts: Runtime Error

Accepted