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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

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

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


Verdicts: Runtime Error

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
t,a,k = input().split()
while k>0:
  if t>0:
    t-=1
    k-=1
  elif t==0 and a>0:
    a-=1
    k-=1
  else if t==0 and a==0:
    break
print(str(t)+' '+str(a))

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

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

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

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

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):
temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]

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

print(str(a)+' '+str(b))

temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]
if k > 0:
  if k <= a:
    a = a - k
  else:
    a = 0
    k = k - a
    if k <= b:
      b = b - k
    else:
      b = 0

print(str(a)+' '+str(b))

temp = list(map(int,input().split()))
a = temp[0]
b = temp[1]
k = temp[2]
if k > 0:
  if k < a:
    a = a - k
  else:
    k = k - a
    a = 0
    if k < b:
      b = b - k
    else:
      b = 0

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):
import sys
def input():
    return sys.stdin.readline()[:-1]

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(A,B)

import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

print(A,B)

import sys
def input():
    return sys.stdin.readline()[:-1]

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(A,B)

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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) if K>A+B

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

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

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

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

Verdicts: Wrong Answer

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

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


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

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


Verdicts: Wrong Answer

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

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

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

if __name__ == '__main__':
	main()

Verdicts: Runtime Error

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

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

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

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

print(A,B)

ABK=list(map(int,input().strip().split()))

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

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

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

Verdicts: Runtime Error

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

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

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

print( ’{} {}’.format( ans_t, ans_a))


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

Verdicts: Runtime Error

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

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

Verdicts: Runtime Error

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

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

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


Verdicts: Wrong Answer

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

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

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

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
  if k-a>=b:
    B=0
  else:
    B=b
else:
  A=a-k
  B=b
print('{}{}'.format(A,B))

a,b,k=map(int,input().split())
if k>=a:
  A=0
  if k-a>=b:
    B=0
  else:
    B=b-(k-a)
else:
  A=a-k
  B=b
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 = input().rstrip().split(' ')
b=[int(i) for i in a]
print(b)
S,T,U=b[0],b[1],b[2]
if S>U:
    S1=S-U
    print(S1,T)
elif S==U:
    print(0,T)
elif S<U and S+T>U:
    U1=U-S
    T1=T-U1
    print(0,T1)
else:
    print(0,0)

a = input().rstrip().split(' ')
b=[int(i) for i in a]
S,T,U=b[0],b[1],b[2]
if S>U:
    S1=S-U
    print(S1,T)
elif S==U:
    print(0,T)
elif S<U and S+T>U:
    U1=U-S
    T1=T-U1
    print(0,T1)
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):
i = input()
a = int(i.split()[0])
b = int(i.split()[1])
k = int(i.split()[2])

for n in range(k):
  if a > 1:
    a -= 1
  elif b > 1:
    b -= 1
  else:
    break
print(a,b)

a = input()

print(a)

i = input().split()
a = int(i[0])
b = int(i[1])
k = int(i[2])

if k >= a+b:
  a = b = 0

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

else:
  a = a - k

print(a,b)

i = input().split()
a = int(i[0])
b = int(i[1])
k = int(i[2])
c = a 
d = b

if k >= a+b:
  c = d = 0

elif k == a:
  c = 0

elif k > a:
  c = 0
  d = b - (k - a)

else:
  c = a - k
  
print(c,d)

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())
for _ in range(k):
    if a+b==k:
        a=0
        b=0
        break
    if a>0:
        a-=1
    else:
        b-=1
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 = int(input().split())

if a <= k:
  if b -(k - a) <=0:
    print('0 0')
  else:
    s = 0
    t = b - (k - a)
    print('{} {}'.format(s, t))
else:
  s = a - k
  t = b
  print('{} {}'.format(s, t))


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

if a <= k:
  if b -(k - a) <=0:
    print('0 0')
  else:
    s = 0
    t = b - (k - a)
    print('{} {}'.format(s, t))
else:
  s = a - k
  t = b
  print('{} {}'.format(s, t))


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

    

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

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

if __name__ == "__main__":
    resolve()

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

    

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

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

if __name__ == "__main__":
    resolve()

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

    

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

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

if __name__ == "__main__":
    resolve()

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

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

a,b,k=map(int,input().split())
m = a-k
if(0<=m):
  print(m,b)
else:
  l = 0-m
  n = b-l
  if(0<=n):
    print(0,n)
  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):
x = input().split()
A, B, K = [int(i) for i in x]
if A - K > 0:
  print(str(A-K) + " " + str(B-K))
elif B - K > 0:
  print("0" + " " + str(A+B-K))
else:
  print("0 0")

x = input().split()
A, B, K = [int(i) for i in x]
if A - K > 0:
  print(str(A-K) + " " + str(B))
elif A+B-K > 0:
  print("0" + " " + str(A+B-K))
else:
  print("0 0")

Verdicts: Wrong Answer

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

Submission attempts (in order):
input_list = list(map(int, input().split()))
takahashi = input_list[0]
aoki = input_list[1]
turn = input_list[2]
if takahashi >= turn:
    takahashi -= turn
else:
    takahashi = 0
    turn = turn - takahashi
    if turn > aoki:
        aoki = 0
    else:
        aoki -= turn
print(takahashi, aoki)

input_list = list(map(int, input().split()))
takahashi = input_list[0]
aoki = input_list[1]
turn = input_list[2]
if takahashi >= turn:
    takahashi -= turn
else:
    turn -= takahashi
    takahashi = 0
    if turn > aoki:
        aoki = 0
    else:
        aoki -= turn
print(takahashi, aoki)

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


A = A - min(A,K)
K = K - min(A,K)
B = B - min(B,K)

print(A, B)

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


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

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

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

Verdicts: Wrong Answer

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

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

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


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

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


Verdicts: Wrong Answer

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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

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

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

print(a + " " + b)

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

first_a = a
a -= k if k < a else a
k -= first_a if a == 0 else 0
b -= 0 if a != 0 else k
b = 0 if b < 0 else b

print(a, end=" ")
print(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(' '))


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

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

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

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


main(A, B, K)

A, B, K = map(int, input().split(' '))
# A,B,K = 10**12,10**12,10**12



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

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

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

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


main(A, B, K)


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(x) for x in input().split()]
return max(0, A - k) + max(0, B - k)

A, B, K = [int(x) for x in input().split()]
print(*[max(0, A - k),max(0, B - k)])

# B - Greedy Takahashi

A, B, K = [int(x) for x in input().split()]
AB = A + B
if A > K:
    print(A - K, B)
elif AB > K:
    print(0, AB - K)
else:
    print(0, 0)

Verdicts: Runtime Error

Runtime Error

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

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

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

Verdicts: Wrong Answer

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

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

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

print(a,b)

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

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

print(a,b)

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

x = max(A, K)
A -= x
K -= x

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

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

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

print(A, B)

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

smaller = min(A, K)
A -= smaller
K -= smaller

print(A, max(B - K, 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 -*-

def solve():
    A, B, K = list(map(int, input().split()))

    ans = 0
    if K > A:
        ans += A
        if K > B:
            ans += B
        else:
            ans += K
    else:
        ans += K

    print(K)


if __name__ == "__main__":
    solve()


# -*- coding:utf-8 -*-

def solve():
    A, B, K = list(map(int, input().split()))

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

    print(A, B)


if __name__ == "__main__":
    solve()


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

if b < 0:
    print(0, 0)

else:
    print(A-K, B)


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

if A >= K:
    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):
data = map(int,input().split())
for i in range(data[2]):
  if data[0] >= 1:
    data[0] -= 1
  elif data[1] >=1:
    data[1] -=1
print(f'{data[0]} {data[1]}')

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

if num <= ta_c:
    print(ta_o-num,ao_c):
elif ta_c < num <= ta_c + ao_c:
    ao_c = ta_c+ao_c - num
    ta_c = 0
    print(ta_c,ao_c)
else;
    ta_c, ao_c = 0,0
    print(ta_c,ao_c)

ta_c,ao_c,num = map(int,input().split())

if num <= ta_c:
    print(ta_c-num,ao_c)
elif ta_c < num <= ta_c + ao_c:
    ao_c = ta_c+ao_c - num
    ta_c = 0
    print(ta_c,ao_c)
else:
    ta_c, ao_c = 0,0
    print(ta_c,ao_c)

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(i) for i in input().split(" ")]
if a >= k:
    print("%d %d" % (a - k, b))
else: # a < k
    print("%d %d" % (0, max([b + (a - k), 0]))



a, b, k = [int(i) for i in input().split(" ")]
if a >= k:
    print("%d %d" % (a - k, b))
else: # a < k
    print("%d %d" % (0, max([b + (a - k), 0])))


Verdicts: Runtime Error

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

Submission attempts (in order):
a, b, k = int(i) for i in input().split()
takahashi = a - k
aoki = b + takahashi if takahashi < 0 else b
print(f"{max(takahashi, 0)} {max(aoki, 0)}")


a, b, k = input().split()
takahashi = a - k
aoki = b + takahashi if takahashi < 0 else b
print(f"{max(takahashi, 0)} {max(aoki, 0)}")

a, b, k = (int(i) for i in input().split())
takahashi = a - k
aoki = b + takahashi if takahashi < 0 else b
print("{} {}".format(max(takahashi, 0), max(aoki, 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())

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


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

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


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

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


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

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


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):
a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
if a[0] > 0 and a[1] > 0:
  print("0 0")
  return
else:
  if a[2] > a[0]:
    a[0] = 0
  a[2] = a[2] - a
  if a[2] > a[1]:
    a[1] = 0
  else: 
    a[1] = a[1] - a[2]
print(str(a[0]) + " " + str(a[1]))

a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
if a[0] > 0 and a[1] > 0:
  for i in range(0, int(a[2])):
    if a[0] > 0:
      a[0] -= 1
    else:
      if a[0] == 0 and a[1] == 0:
  	  	break
  	  else:
        a[1] -= 1
print(str(a[0]) + " " + str(a[1]))

a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
if a[0] == 0 and a[1] == 0:
	print("0 0")
else:
	if a[2] > a[0]:
		a[0] = 0
		a[2] = a[2] - a[0]
		if a[2] > a[1]:
			a[1] = 0
		else:
			a[1] = a[1] - a[2]
	else:
		a[0] = a[0] - a[2]
	print(str(a[0]) + " " + str(a[1]))

a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
if a[0] > 0 and a[1] > 0:
  print("0 0")
else:
  if a[2] > a[0]:
    a[0] = 0
  a[2] = a[2] - a
  if a[2] > a[1]:
    a[1] = 0
  else: 
    a[1] = a[1] - a[2]
  print(str(a[0]) + " " + str(a[1]))

a = input().split(" ")
a[0] = int(a[0])
a[1] = int(a[1])

if not a[0] == 0 and a[1] == 0:
  for i in range(0, int(a[2])):
      if a[0] >= 1: 
        a[0] -= 1
      elif a[1] >= 1:
        a[1] -= 1
      else:
        break
print(str(a[0]) + " " + str(a[1]))


a,b,k = map(int, input().split())
x = 0 if k > a else a - k
y = b if (k - a) <= 0 else (0 if (k - a) > b else b - (k - a))
print("{} {}".format(x,y))

Verdicts: 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, X = list(map(int,input().split()))
if A > X:
  print(A-X, B)
elif A <= x and B > X - A:
  print(0, B-(X-A))
elif A == 0 and B == 0:
  print(0,0)
else:
  print(0,0)

A, B, X = list(map(int,input().split()))
if A > X:
  print(A-X, B)
elif A <= X and B > X - A:
  print(0, B-(X-A))
elif A == 0 and B == 0:
  print(0,0)
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):
import sys
sys.setrecursionlimit(10**9)

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

if k > 10**9:

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

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


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

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

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

print("{}".format(a) + " {}".format(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):
n_list = n.split(" ")
a = int(n_list[0])
b = int(n_list[1])
k = int(n_list[2])

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

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

n = input()
n_list = n.split(" ")
a = int(n_list[0])
b = int(n_list[1])
k = int(n_list[2])

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

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

n = input()
n_list = n.split(" ")
a = int(n_list[0])
b = int(n_list[1])
k = int(n_list[2])

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

Verdicts: Runtime Error

Wrong Answer

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

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

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

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

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

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

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

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

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

elif K < A:
    print(str(A-K)+' '+str(B))

elif K >= A:
    print(str(0)+' '+str(B-(K-A)))

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


a, b, k = [int(a) for a in input().split()]
print(a - k, b) if a >= k else print(0, b - (a - k)) if a + b - k > 0 else print(0, 0)


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

lines = sys.stdin.readlines()

a, b, k = map(int, lines[0].split())

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

import sys

lines = sys.stdin.readlines()

a, b, k = map(int, lines[0].split())

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

print(a, b)

import sys

lines = sys.stdin.readlines()

a, b, k = map(int, lines[0].split())

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

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

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

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

a = list(map(int,input().split(' ')))
x = a[0]
y = a[1]
z = a[2]

if (z >= x + y): print('0 0')
else:
  if z < x: print(str(x - z) + ' ' + str(y))
  else: print('0' + ' ' + str(y - z))

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted