Problem:


Score : 200 points

Problem Statement

Takahashi has A cookies, and Aoki has B cookies.
Takahashi will do the following action K times:

If Takahashi has one or more cookies, eat one of his cookies.

Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.

If they both have no cookies, do nothing.

In the end, how many cookies will Takahashi and Aoki have, respectively?

Constraints

0 \leq A \leq 10^{12}

0 \leq B \leq 10^{12}

0 \leq K \leq 10^{12}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B K

Output

Print the numbers of Takahashi's and Aoki's cookies after K actions.

Sample Input 1

2 3 3

Sample Output 1

0 2

Takahashi will do the following:

He has two cookies, so he eats one of them.

Now he has one cookie left, and he eats it.

Now he has no cookies left, but Aoki has three, so Takahashi eats one of them.

Thus, in the end, Takahashi will have 0 cookies, and Aoki will have 2.

Sample Input 2

500000000000 500000000000 1000000000000

Sample Output 2

0 0

Watch out for overflows.



Sample input:
2 3 3


Sample output:
0 2

Submission status: Time Limit Exceeded

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

    for i in range(K):
        if 1 <= A:
            A-=1
        elif 1 <= B:
            B-=1

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

if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, raw_input().split())
while k > 0:
  if a > 0:
    a -= 1
  elif b > 0:
    b -= 1
  k -= 1
print a, b

Submission status: Time Limit Exceeded

Solution code:
INPUT = list(map(int, input().split()))

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

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

Submission status: Time Limit Exceeded

Solution code:
A, B, K = [int(n) for n in input().split(' ')]
 
for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
 
print(A, B)

Submission status: Time Limit Exceeded

Solution code:
A, B, K = [int(n) for n in input().split(' ')]

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

print(A, B)

Submission status: Time Limit Exceeded

Solution code:
in_list = input().split()
A, B, K = int(in_list[0]), int(in_list[1]), int(in_list[2])

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

print(A, B)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(a,b)

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, input().split())
for i in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    for j in range(k-i):
      b -= 1
      if b < 1:
        break
    break
  else:
    break
print("{} {}".format(a, b))

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, input().split())
for i in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
print("{} {}".format(a, b))

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
a,b,k=[int(x) for x in stdin.readline().rstrip().split()]
while k>0:
    if a>=1:
        a-=1
    else :
      b-=1
    k-=1
print(a,b)

Submission status: Time Limit Exceeded

Solution code:
stdin = input().split()
a = int(stdin[0]) # 高橋君のクッキー
b = int(stdin[1]) # 青木君のクッキー
K = int(stdin[2]) # 繰り返し回数

for turn in range(K):
  if a > 0: # 高橋君のクッキーがあった
    a -= 1
  elif b > 0: # 青木君のがあった
    b -= 1


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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(lambda x: int(x), input().split())

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

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

Submission status: Time Limit Exceeded

Solution code:
a, b, c = map(int, input().split())

for _ in range(c):
  if a > 0:
    a -= 1
  elif b > 0:
    b -= 1
  else:
    break
    
print(a, b)

Submission status: Time Limit Exceeded

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

for i in range(k):
  
  if a > 0:
    a -= 1
  elif b > 0:
    b -= 1
  else:
    pass
  
print(a, b)

Submission status: Time Limit Exceeded

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

count = 0

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

Submission status: Time Limit Exceeded

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

count = 0

while count < K:
    if A > 0:
        A -= 1
        count += 1
        continue
        
    if B > 0:
        B -= 1
        count += 1
        continue
        
    if A == 0 and B == 0:
        count += 1
        continue
print(A, B)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
class CookieCalc:
  def __init__(self, t_cookie, a_cookie):
    self.takahashi_cookie = t_cookie
    self.aoki_cookie = a_cookie
    
  def eat_cookie(self):
    if self.takahashi_cookie > 0:
      self.takahashi_cookie-=1
    elif self.aoki_cookie > 0:
      self.aoki_cookie -= 1
      
t_cookie,a_cookie,K = [int(s) for s in input().split()]
cookie = CookieCalc(t_cookie, a_cookie)

for i in range(K):
  cookie.eat_cookie()
  
print(cookie.takahashi_cookie, cookie.aoki_cookie)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for x in range(0 , K):
    if (A >= 1):
        A = A - 1
        #print(A)
    elif (A == 0) and (B >= 1):
        B = B - 1
        #print(B)

print(A, B)

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
a, b, k = input().split()
a = int(a)
b = int(b)
k = int(k)

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a,b,k = map(int,input().split())
for _ in range(k):
    if a > 0:
        a-=1
    elif b > 0:
        b-=1
    else:
        break
print("{} {}".format(a,b))

Submission status: Time Limit Exceeded

Solution code:
c=list(map(int, input().split()))

for i in range(c[2]):
  if c[0]!=0:
    c[0]-=1
  else :
    c[1]-=1
print(c[0] , c[1])

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
A,B,K = map(int, input().split())

while(K > 0):
  if A > 0:
    A -= 1
  else:
    if B > 0:
      B -= 1
    else:
      break
  K -= 1
print(' '.join(map(str, [A,B])))

Submission status: Time Limit Exceeded

Solution code:
a,b,k=input().split()
a=int(a)
b=int(b)
k=int(k)
f=True
if a<0 or 10**12<a:
  f=False
if b<0 or 10**12<b:
  f=False
if k<0 or 10**12<k:
  f=False
if not f:
  a=0
  b=0
  print(a,b)
  exit(0)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
b,c,d = map(int, input().split(" "))
for i in range(d):
    if b!=0:
        b-=1
    elif c!=0:
        c-=1
    else:
        break
print(b,c)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3

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

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

print(a, b)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3

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

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

print(a, b)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
abk = input().split()
abk2 = []
for ee in abk:

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
list = input().split(' ')
(A,B,K)=(int(list[0]),int(list[1]),int(list[2]))
for i in range(K):
    if A >= 1:
        A = A-1
    elif B >= 1:
        B = B-1
print(A,B)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
List = list(map(int,input().split()))

t_num = int(List[0])
a_num = int(List[1])
times = int(List[2])

return_zero = times - (t_num + a_num)

if return_zero >= 0:
  print("0 0")
else:
  while times > 0:
    times -= 1
    if t_num >= 1:
      t_num -= 1
    elif t_num == 0 and a_num >= 1:
      a_num -= 1
    elif t_num ==0 and a_num == 0:
      t_num = t_num
      a_num = a_num
  
  print(str(t_num) +" "+ str(a_num))

Submission status: Time Limit Exceeded

Solution code:
text = input()
text = text.split(' ')
A, B, K = int(text[0]), int(text[1]), int(text[2])

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

print(A, B)

Submission status: Time Limit Exceeded

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

takahashi_cookie = A
aoki_cookie = B
iteration = K

for i in range(0, K):
    if(1 <= takahashi_cookie):
        takahashi_cookie -= 1

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

    else:
        pass

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

Submission status: Time Limit Exceeded

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

takahashi_cookie = A
aoki_cookie = B
iteration = K

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

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

    else:
        pass

    iteration -= 1

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

Submission status: Time Limit Exceeded

Solution code:
takahashi, aoki, K = list(map(int, input().split(" ")))

for _ in range(K):
    if takahashi >= 1:
        takahashi -= 1
    elif takahashi == 0 and aoki == 0:
        continue
    elif takahashi < 1 and aoki >= 1:
        aoki -= 1

print(takahashi, aoki)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(a,b)

Submission status: Time Limit Exceeded

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

for idx in range(k):
  if (a >= 1):
    a = a - 1
  elif (b >= 1) :
    b = b -1
  else :
    pass

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

Submission status: Time Limit Exceeded

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

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

        
        
        
print(A,B)

Submission status: Time Limit Exceeded

Solution code:
A = [int(e) for e in input().split()]

for i in range(A[2]):
    if A[0] >= 1:
        A[0] -= 1
    elif A[1] >= 1:
        A[1] -= 1
print(A[0],A[1])

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
while A > 0 and K > 0:
    A -= 1
    K -= 1
while B > 0 and K > 0:
    B -= 1
    K -= 1
print(str(A) + ' ' + str(B))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])
 
for i in range(numK):
  if taka >= 1:
    taka -= 1
    continue
  elif aoki >= 1:
    aoki -= 1
    continue
  else:
    break
 
print(str(taka) + ' ' + str(aoki))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
count = 0

while count < K:
    if A != 0:
        A -= 1
    elif B != 0:
        B -= 1
    else:
        pass
    count += 1
print(str(A)+" "+str(B))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for _ in range(K):
	if A >= 1:
		A -= 1
	elif B >= 1:
		B-= 1

print(A, B)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for _ in range(k):
	if a:
		a -= 1
	elif b:
		b -= 1
		
print(a, b)

Submission status: Time Limit Exceeded

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

for i in range(k):
  if a > 0:
    a -= 1
  elif b > 0:
    b -=1
  else:
    break
    
print("{} {}".format(a,b))

Submission status: Time Limit Exceeded

Solution code:
A,B,K=(int(x) for x in input().split())

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

Submission status: Time Limit Exceeded

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

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

print(a,b)

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, input().split())
 
for i in range(k):
  if a > 0:
    a -= 1
  elif b > 0:
    b -= 1
  else:
    break
 
print('{} {}'.format(a, b))

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
if A + B == K:
  print("0 0")
  exit()
while True:
  if A >= K:
    t1 = K
    K -= K
    A -= t1
  elif A > 0:
    A -= 1
    K -= 1
  elif B >= K:
    t2 = K
    K -= K
    B -= t2
  elif B > 0:
    B -= 1
    K -= 1
  if K == 0:
    break
print(str(A) + " " + str(B))

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
if A + B == K:
  print("0 0")
  exit()
while (K > 0):
  if A >= K:
    t1 = K
    K -= A
    A -= t1
  elif A > 0:
    A -= 1
    K -= 1
  elif B >= K:
    t2 = K
    K -= B
    B -= t2
  elif B > 0:
    B -= 1
    K -= 1
print(str(A) + " " + str(B))

Submission status: Time Limit Exceeded

Solution code:
# 値を入力
A,B,K=map(int,input().split())

#ループ
for i in range(K):
    if A>=1:
        A-=1
    elif B>=1:
        B-=1
        
# 結果の出力
print(A,B,sep=" ")

Submission status: Time Limit Exceeded

Solution code:
takahashi,aoki,k=input().split()

tk=int(takahashi)
ak=int(aoki)
c=int(k)

for i in range(c):
    if(tk>=1):
        tk = tk - 1
    elif(ak>=1):
        ak = ak - 1
    else:
        break

print(tk,ak)

Submission status: Time Limit Exceeded

Solution code:

input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]
 
 
for i in range(ABK[2]):
 
    if ABK[0] > 0:
        ABK[0] -= 1
 
    elif ABK[1] > 0: 
        ABK[1] -= 1
 
    else:
        pass
print(ABK[0]," ",ABK[1])

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!

input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]


for i in range(ABK[2]):
    if ABK[0] > 0:
        ABK[0] -= 1
        ABK[2] -= 1
        if ABK[2]==0:
            break
    elif ABK[1] > 0: 
        ABK[1] -= 1
        ABK[2] -= 1
        if ABK[2]==0:
            break
    else:
        pass

print(ABK[0]," ",ABK[1])

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
i = 0
while i < K:
    if C > K:
        if K > 0 and A > 0:
            K -= 1
            A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
        i += 1
    else:
        A = 0
        B = 0
        break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
for i in range(K):
    if C > K:
        if K > 0 and A > 0:
            K -= 1
            A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
    else:
        A = 0
        B = 0
        break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
while True:
    if C > K:
        if K > 0 and A > 0:
            K -= 1
            A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
    else:
        A = 0
        B = 0
        break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
while True:
    if C > K:
        if K > 0:
            K -= 1
            if A > 0:
                A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
    else:
        A = 0
        B = 0
        break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
while True:
    if C == K or C < K:
        A = 0
        B = 0
        break
    else:
        if K > 0:
            K -= 1
            if A > 0:
                A -= 1
            if A == 0:
                if K != 0:
                    if B != 0:
                        B -= 1
            if B == 0:
                break
        else: break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
while True:
    if C == K or C < K:
        A = 0
        B = 0
        break
    else:
        if K > 0:
            K -= 1
            if A > 0:
                A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,input().split())
C = A + B
for i in range(K):
    if C == K or C < K:
        A = 0
        B = 0
        break
    else:
        if K > 0:
            K -= 1
            if A > 0:
                A -= 1
            if A == 0 and B != 0 and K != 0:
                B -= 1
            if B == 0:
                break
        else: break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]

while ABK[0] > 0 and ABK[2] >= 1:
    ABK[0] -= 1
    ABK[2] -= 1
else:
    pass
while ABK[1] > 0 and ABK[2] >= 1:
    ABK[1] -= 1
    ABK[2] -= 1
else:
    pass

print(ABK[0]," ",ABK[1])

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
a,b,k = map(int,input().split())

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

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int,(input().split()))
i = 0
while i < K:
    if K > 0:
        if A > 0:
            A -= 1
            if A == 0:
                B -= 1
                if B == 0:
                    break
        i += 1
    else:
        break
print (A,B)

Submission status: Time Limit Exceeded

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        pass
print(A,end=" ")
print(B)

Submission status: Time Limit Exceeded

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

for i in range(k):
  if a > 0:
    a -= 1
  elif b > 0:
    b -= 1
  else:
    pass
  
print(a,b)

Submission status: Time Limit Exceeded

Solution code:
A, B, K = [int(i) for i in input().split()]
 
for i in range(1, K+1):
  if A >= 1:
    A -= 1
  elif B >= 1:
    B -= 1
  else:
    break
 
print(str(A)+' '+str(B))

Submission status: Time Limit Exceeded

Solution code:
import os
import sys

def main():
    A , B , K = map(int , input().split())
    for i in range(0 , K) :
        if A >= 1 :
            A = A - 1
        elif A == 0 and B >= 1 :
            B = B - 1
        else :
            pass
    print (str(A) + " " + str(B))

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
A, B, K = input().split()
A = int(A)
B = int(B)
K = int(K)
cond = True

while(cond):
  if (A > 0):
    A -= 1 
    K -= 1
  elif (A == B == 0):
    pass
  else:
    cond = False
while (K != 0):
  B -= 1
print(A, B)

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, input().split())
for _ in range(k):
    if a != 0:
        a -= 1
    else:
        b -= 1
print(a,b)

Submission status: Time Limit Exceeded

Solution code:
a = list(map(int,input().split()))
 
for i in range(a[2]):
  if a[0] != 0:
    a[0] = a[0] - 1
  elif a[1] != 0:
    a[1] = a[1] - 1
 
print(a[0],a[1])

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
if A + B == K:
  print("0 0")
  exit()
while (K > 0):
  if A > 0:
    A -= 1
  elif B > 0:
    B -= 1
  K -= 1
print(str(A) + " " + str(B))

Submission status: Time Limit Exceeded

Solution code:
A,B,K=map(int,input().split())
while K!=0:
  if A>=1:
    A-=1
    K-=1
  else:
    B-=1
    K-=1
print(A,' ',B)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(A,B)

Submission status: Time Limit Exceeded

Solution code:
a, b, k = input().split()
a = int(a)
b = int(b)
k = int(k)
for i in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  else:
    continue
    
print("{} {}".format(a, b))

Submission status: Time Limit Exceeded

Solution code:
a,b,k = map(int, input().rstrip().split(' '))

for i in range(k):
    if a >= 1:
        a = a - 1
    elif b >= 1:
        b = b - 1
    
print("{} {}".format(a,b))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
In = input().split(" ")
T = int(In[0])
A = int(In[1])
K = int(In[2])
 
if K>=T+A:
  print("0 0")
else:
  if (K > T):
    print("0 {0}".format(A-(K-T)))
  elif (T > K):
    print("{0} {1}".format(T-K, A))
  else:
    for i in range(K):
      if T >= 1:
        T -= 1
      else:
        if A >= 1:
          A -= 1
        else:
          break
    print("{0} {1}".format(T, A))

Submission status: Time Limit Exceeded

Solution code:
n = list(map(int, input().strip().split()))

for count in range(n[2]):
    if n[0] > 0:
        n[0]-=1
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1

print(str(n[0]) + " " + str(n[1]))

Submission status: Time Limit Exceeded

Solution code:
tlv = input()
tv = tlv.split()
tw = [int(i) for i in tv]
while tw[-1] != 0:
    if tw[0] > 0:
        tw[0] -= 1
        tw[-1] -= 1
    else:
        tw[1] -= 1
        tw[-1] -= 1
print(tw[0],tw[1])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
i = list(map(int, input().split()))
t=i[0]
a=i[1]
for s in range(i[2]):    
    if t>0:
        t=t-1
    else:
        a=a-1
print(t,a)

Submission status: Time Limit Exceeded

Solution code:
l = list(map(int, input().split()))
a =l[0]
b =l[1]
k =l[2]

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

Submission status: Time Limit Exceeded

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

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


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



for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        pass

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

Submission status: Time Limit Exceeded

Solution code:
n = list(map(int, input().strip().split()))
count=0

while count < n[2]:
    if n[0] > 0:
        n[0]-=1
        count+=1
    elif n[1] > 0:
        n[1]-=1
        count+=1

print(str(n[0]) + " " + str(n[1]))

Submission status: Time Limit Exceeded

Solution code:
a,b,c = map(int,input().split())

if c >= a + b:
    print('0' + ' ' + '0')
    exit
else:
    
    for i in range(c):
        if a > 0:
            a = a - 1
        elif b > 0:
            b = b -1
        else:
            break
    
    print(str(a) + ' ' + str(b))

Submission status: Time Limit Exceeded

Solution code:
a = list(map(int, input().split()))

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

print("{} {}".format(a[0], a[1]))

Submission status: Time Limit Exceeded

Solution code:
In = input().split(" ")
T = int(In[0])
A = int(In[1])
K = int(In[2])
 
if K>=T+A:
  print("0 0")
  
elif (K > T):
  print("0 {0}".format(A-(K-T)))
elif (T > K):
  print("{0} {1}".format(T-K, A))
else:
  for i in range(K):
    if T >= 1:
      T -= 1
    else:
    	if A >= 1:
      		A -= 1
    	else:
      		break
  print("{0} {1}".format(T, A))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
In = input().split(" ")
T = int(In[0])
A = int(In[1])
K = int(In[2])
 
if K>=T+A:
  print("0 0")
  
elif (K > T):
  print("0 {0}".format(A-(K-T)))
elif (T > K):
  print("{0} {1}".format(T-K, A))
else:
  for i in range(K):
    if T >= 1:
      T -= 1
    elif A >= 1:
      A -= 1
    else:
      break
  print("{0} {1}".format(T, A))

Submission status: Time Limit Exceeded

Solution code:
A,B,K=map(int, input().split())
for i in range(1,K+1):
	if 1 <= A:
		A -= 1
	elif 1 <= B:
		B -= 1
	else:
		print('0 0')
print(str(A) + ' ' + str(B))

Submission status: Time Limit Exceeded

Solution code:
a,b,k=map(int,input().split())
cnt=0
for i in range(k):
  if a>=1:
    a-=1
  elif b>=1:
    b-=1
  else:
    break
print("{} {}".format(a,b))

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a=list(map(int, input().split()))
taka=a[0]
ao=a[1]
K=a[2]
i=0
while 1:
    if i<K:
        if taka>0:
            taka-=1
            i+=1
        elif ao>0:
            ao-=1
            i+=1
        else:
            break
    else:
        break
print(taka,ao)

Submission status: Time Limit Exceeded

Solution code:
A,B,K = map(int, input().split())
for _ in range(K):
    if A>0:
        A -= 1
    elif B>0:
        B -= 1
print(A,B)