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:
import sys

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

print(A,'',B)

Submission status: Time Limit Exceeded

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

while True:
    A-=1
    K-=1
    if A==0 or K==0:
        break
while True:
    B-=1
    K-=1
    if B==0 or K==0:
        break
print(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
    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 > 0:
        a -= 1
    elif b > 1:
        b -= 1
print(a,b)

Submission status: Time Limit Exceeded

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

#もし高橋君がクッキーを 1 枚以上持っているなら、高橋君のクッキーを 1 枚食べる。
#そうでなく、もし青木君がクッキーを 1 枚以上持っているなら、青木君のクッキーを 1 枚食べる。
#高橋君も青木君もクッキーを持っていないなら、何もしない。

for _ in range(k):
  if a >= 1:
  	a = a - 1
  elif a == 0 and 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(1,K+1):
  if A>=1:
    A-=1
  elif A<1 and B>=1:
    B-=1
  else:
    pass
print(A,B,end=' ')

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,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())
for i in range(K):
    if A!=0:
        A=A-1
    else:
        B=B-1
print(A,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 >= 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 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:
import sys
input = sys.stdin.readline

INF = float('inf')


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

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


if __name__ == '__main__':
    main()

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:
    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 = 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())
i = 0
while i < K:
    if A != 0:
        A -= 1
    else:
        B -= 1
    i += 1
print(str(A) + " " + str(B))

Submission status: Time Limit Exceeded

Solution code:
def main():
    A,B,K = map(int,input().split())
    while K > 0:
        if A >= 1:
            A -= 1
        elif B >= 1:
            B -= 1
        K -= 1
    print("{} {}".format(A,B))
main()

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(str(a) + ' ' + str(b))

Submission status: Time Limit Exceeded

Solution code:
import sys

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

if a+b==k:
  print(0,0)
  sys.exit()

while k>0 and a>0 and b>0:
  if a>0:
    while a>0 or k>0:
      if a==0 or k==0:
        break
      a-=1
      k-=1
  if b>0:
    while b>0 or k>0:
      if b==0 or k==0:
        break
      b-=1
      k-=1
print(a,b)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
A, B, K = map(int, input().split())
def func():
  pass
for i in range(K):
  if A >= 1:
    A -= 1
  elif A < 1 and B >= 1:
    B -= 1
  else:
    func()
print(A, B)

Submission status: Time Limit Exceeded

Solution code:
a, b, k = map(int, input().split())
l=[a,b]
for l in range(k-1):
  if a>0:
    a=a-1
  if a==0 and b>0:
    b=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(a,b)

Submission status: Time Limit Exceeded

Solution code:
A,B,K=list(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())
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,b,k=map(int,input().split())
for i 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:
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(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:
        continue
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>=1:
        a-=1
    elif a==0 and b==0:
        pass
    else:
        if b>=1:
            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,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(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
        
        
    
        if a == 0 and b >= 1:
            b -= 1
            if b == 0:
                exit()
    
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)

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


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

print(taka,aoki)

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

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(10**7)

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:
ta,ao,N= map(int,input().split())
#li = [int(x) for x in input().split()]
for i in range(N):
  if ta>0:
    ta-=1
  elif ao>0: 
    ao-=1
  elif (ta==0 & ao==0):
    break
    
print(str(ta)+" "+str(ao))

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,K = map(int,input().split())
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())
while(k > 0):
    if (a > 0):
        a -= 1
        k -= 1
    elif (b > 0):
        b -= 1
        k -= 1
    else:
        k -= 1
print("%s %s" % (a, b))

Submission status: Time Limit Exceeded

Solution code:
A,B,K=map(int,input().split())
for x 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
    else:
        b-=1
    if a==0 and b==0:
        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

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

Submission status: Time Limit Exceeded

Solution code:
[A,B,K] = list(map(int,input().split()))
for i in range(0,K):
    if A>=1:
        A-=1
    else:
        if B>=1:
            B-=1
        else:
            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>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 > 0:
    A -= 1
    continue
  
  if A ==0 and B > 0:
    B -= 1
    continue
  
  else:
    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,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())
for i in range(k):
    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 >= 1:
        a -= 1
    elif b >= 1:
        b -= 1

print(a, b, sep=" ")

Submission status: Time Limit Exceeded

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

if((a[0]+a[1]) == a[2]):
    print("0 0")

if((a[0]+a[1]) != a[2]):
    for i in range(0, a[2]):
        if(a[0] >= 1):
            a[0] -= 1
        elif(a[1] >= 1):
            a[1] -= 1
    print("%d %d"%(a[0],a[1]))

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
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:
n,m,k=map(int,input().split())
for i in range(k):
  if n>0:
    n-=1
  elif m>0:
    m-=1
  else:
    break
print(n,m)

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

Submission status: Time Limit Exceeded

Solution code:
A,B,K = [int(_) for _ in 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 = list(map(int,input().split()))

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

Submission status: Time Limit Exceeded

Solution code:
[A,B,K]=list(map(int, input().split()))
for i in range (0,K):
    if A >= 1:
        A=A-1
    elif B >= 1:
        B=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(A, B, sep=' ')

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, sep=' ')

Submission status: Time Limit Exceeded

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

while(K):
    if(A >=1):
        A -= 1
    elif(B >=1):
        B -= 1
    K -= 1
print(A, end=" ")
print(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
  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
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
    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 >= 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().split())

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

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

Submission status: Time Limit Exceeded

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

time = 0

while time < K:
    if A == 0 and B > 0:
        B = B - 1
    if A > 0:
        A = A - 1
    time = time + 1
A = str(A)
B = str(B)
print(A+" "+B)

Submission status: Time Limit Exceeded

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

while K != 0:
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        break
    K -= 1

print(A, B)

Submission status: Time Limit Exceeded

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

while K != 0:
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    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 -= 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 i in range(k):
    if a > 0:
        a -= 1
    elif a == 0:
        if b > 0:
            b -= 1
        else:
            break
print(a,b)

Submission status: Time Limit Exceeded

Solution code:
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
    elif cB > 0:
        cB=cB-1

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

Submission status: Time Limit Exceeded

Solution code:
STRI = input()
DICT = STRI.split()
A=int(DICT[0])
B=int(DICT[1])
K=int(DICT[2])
cA=A
cB=B
stop = False

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

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

Submission status: Time Limit Exceeded

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

print(A,B)

Submission status: Time Limit Exceeded

Solution code:
takahashi, aoki, kurikaeshi = input().split()
t,a = int(takahashi),int(aoki)
for i in range(int(kurikaeshi)):
  if t >= 1:
     t -= 1
  elif a >= 1:
    a -= 1
print(t,a)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
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('{} {}'.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:
        print('0 0')
        exit()

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
for i in range(k):
    if a > 0:
        a -= 1
    elif b > 0:
        b -= 1
print("{0} {1}".format(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 k 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=list(map(int,input().split()))
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
A, B, K = map(int, input().split())
for _ 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:
import sys
input = sys.stdin.readline
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:
    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 = a-1
  elif b >= 1:
    b = 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,B,K = map(int,input().split())

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for _ in range(1, k+1):
    if a >= 1:
        a-=1
    elif b >= 1:
        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=A-1
    elif B > 0 : B=B-1
print(str(A)+" "+str(B))

Submission status: Time Limit Exceeded

Solution code:
inp = input().split(" ")
takahashi = int(inp[0])
aoki = int(inp[1])
K = int(inp[2])

i = 0
while i != K:
    if takahashi > 0 :
        takahashi = takahashi -1
    elif aoki > 0 :
        aoki = aoki-1
    i=i+1

print(str(takahashi) + " " + str(aoki))

Submission status: Time Limit Exceeded

Solution code:
inp = input().split(" ")
takahashi = int(inp[0])
aoki = int(inp[1])
K = int(inp[2])

for i in range(K):
    if takahashi > 0 :
        takahashi = takahashi -1
    elif aoki > 0 :
        aoki = aoki-1

print(str(takahashi) + " " + str(aoki))

Submission status: Time Limit Exceeded

Solution code:
class AC:
    @staticmethod
    def inputStr(char):
        return input().split(char)
    
    @staticmethod
    def inputInt(char):
        a = input().split(char)
        for i in range(len(a)):
            a[i] = int(a[i])
        return a

inp = AC.inputInt(" ")
takahashi = inp[0]
aoki = inp[1]
K = inp[2]

for i in range(K):
    if takahashi > 0 :
        takahashi = takahashi -1
    elif aoki > 0 :
        aoki = aoki-1

print(str(takahashi) + " " + str(aoki))

Submission status: Time Limit Exceeded

Solution code:
class AC:
    @staticmethod
    def inputStr(char):
        return input().split(char)
    
    @staticmethod
    def inputInt(char):
        a = input().split(char)
        for i in range(len(a)):
            a[i] = int(a[i])
        return a

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a, b, k = (int(v) for v in 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:
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())
for i in range(k):
    if a > 0:
        a -= 1
        continue
    if b > 0:
        b -= 1
        continue
print('%d %d'%(a, b))

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

for num in range(0, 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 x in range(k):
    if a >= 1:
         a -= 1
    elif a == 0 and b >=1:
        b = b - 1
    elif a == 0 and b==0:
        pass
print(a, b)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

while count < K:
    if A > 0:
        A = A - 1
    else:
        if B > 0:
            B = B - 1
        else:
            pass
    count=count+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:
        pass

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

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
  elif A == 0 and B > 0:
    B = B - 1
    K = K - 1
  elif A == 0 and B == 0:
    A = 0
    B = 0
    K = 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 = A - 1
    K = K - 1
  elif A == 0 and B > 0:
    B = B - 1
    K = 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 > 0:
    A = A - 1
    K = K - 1
  elif A == 0 and B > 0:
    B = B - 1
    K = K - 1
  elif A == 0 and B == 0:
    A = 0
    B = 0
    K = K - 1

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

Submission status: Time Limit Exceeded

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

for ki 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 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 = [int(e) for e in input().split(' ')]
for i in range(k):
    if a >= 1:
        a -= 1
    elif b >= 1:
        b -= 1

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