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: Wrong Answer

Solution code:
def main():
    A, B, K = map(int, input().split())
    if K > A:
        K -= A
        A = 0
        if K > B:
            K -= B
            B = 0
        else:
            B -= K
            print(A, B)
    else:
        A -= K
        print(A, B)
main()

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
cal=A
if A<K:
    A=0
    B-=(K-cal)

else :
    A-=K
print(A,B)

Submission status: Wrong Answer

Solution code:

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

else :
    A-=K
print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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=' ')

Submission status: Wrong Answer

Solution code:
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=' ')

Submission status: Wrong Answer

Solution code:
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=' ')

Submission status: Wrong Answer

Solution code:
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=' ')

Submission status: Wrong Answer

Solution code:
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=' ')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
if A>=K:
    sum1=A-K
    print(sum1,B)            
else:
    sum2=A+B-K
    print(0,sum2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
c = a - k
d = b + min(c, 0)
print(max(c, 0), d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A-K > 0:
  a = A-K
  b = B
elif A+B > 0:
  a = 0
  b = A+B-K
else:
  a = 0
  b = 0

print(a, " ", b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
t_cookie, a_cookie, K = [int(i) for i in input().split(" ")]
 
t_cookie = t_cookie - K if t_cookie >= K else 0
a_cookie = a_cookie if t_cookie >= K else a_cookie - ( K - t_cookie )
 
print(t_cookie,a_cookie)

Submission status: Wrong Answer

Solution code:
t_cookie, a_cookie, K = [int(i) for i in input().split(" ")]

t_cookie = t_cookie - K if t_cookie >= K else 0
a_cookie = a_cookie if t_cookie > K else a_cookie - ( K - t_cookie )

print(t_cookie,a_cookie)

Submission status: Wrong Answer

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

print(A,B)

Submission status: Wrong Answer

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

print(A,B)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


def solve(A: int, B: int, K: int):
    if A<=K:
        B-=(K-A)
        A=0
    else:
        A-=K
    print(A,B)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np


def solve(A: int, B: int, K: int):
    if A<K:
        B-=(K-A)
        A=0
    else:
        A-=K
    print(A,B)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a<=k:
    print("0"+" "+str(b+(k-a)*(-1)), end="")
else:
    print(str(a-k)+" "+str(b))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int, input().split())
if A>K:
  A=A-K
else:
  B=A+B-K
  A=0
print('{:.0f}'.format(A)+" "+'{:.0f}'.format(B))

Submission status: Wrong Answer

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

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

b = b - tmp 

if b < 0:
    b = 0

print(a,b)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

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

print(a, b)

Submission status: Wrong Answer

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

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

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

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

print(a, b)

Submission status: Wrong Answer

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

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

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

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

print(a, b)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
print(max(a-k, 0), min(b+a-k, b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b>k:
    print("0 0")
else:
    print(0,k-a-b)

Submission status: Wrong Answer

Solution code:
base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print("0 0")
else:
    print(0,k-a-b)

Submission status: Wrong Answer

Solution code:
base = input().split()
a = int(base[0])
b = int(base[1])
k = int(base[2])
if a>=k:
    print(a-k,b)
elif a+b<k:
    print(0,0)
else:
    print(0,k-a-b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A == 0 and B == 0:
    print(A, B)
    exit()

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

print(remain_A, remain_B)

Submission status: Wrong Answer

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

if A == 0 and B == 0:
    print(A, B)
    exit()

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

print(remain_A, remain_B)

Submission status: Wrong Answer

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


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

print(remain_A, remain_B)

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
if a == b:
    a -= (k//2 + k%2)
    b -= k//2
elif a > b:
    k -= (a-b)
    a = b - k//2 - k%2
    b -= k//2
else:
    k -= (b-a)
    b = a
    a -= (k//2 + k%2)
    b -= k//2
print(max(a,0),max(b,0))

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
while k > 0:
  if a == b:
    k = 0
    a -= k//2 + k%2
    b -= k//2
  elif a > b:
    k -= a-b
    a = b
  elif b > a:
    k -= b-a
    b = a
print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
a, b, k = map(int, input().split())
if a > k:
    a = a - k
else:
    tmp = a
    a = 0
    b = b - (k - tmp)
print(a, b)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
a, b, k = map(int, input().split())
if a > k:
    a = a - k
    b = k - a
else:
    tmp = a
    a = 0
    b = b - (k - tmp)
print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
ansa = 0
if a < k:
    ansa =0
    ansb = b-(k-a)
else:
    ansa = a-k
    ansb = b
print(str(ansa)+" "+str(ansb))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A2 = max([0, A - K])
B2 = B - max([0, K - A])

answer = '{} {}'.format(A2, B2)

print(answer)

Submission status: Wrong Answer

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

A2 = max([0, A - K])
B2 = B - max([0, K - A])

answer = '{} {}'.format(A2, B2)

print(answer)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(K):
    if K <= A: # K<Aの時はAが残って終了
        A -= K
        K =0
        break
    elif K < B: # A終了後でもK<BならBが残って終了
        B -= K
        K = 0
        break
    elif 0 < A : # ０＜A<Kの時、Aがなくなる
        K -= A
        A =0
    elif B <= K:# B　<　Kの時、Bがなくなる
        K -= B
        B =0
    elif K <B:
        B -=K
        break

print(A,B)

Submission status: Wrong Answer

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

for i in range(K):
    if K <= A: # K<Aの時はAが残って終了
        A -= K
        K =0
        break
    elif K < B: # A終了後でもK<BならBが残って終了
        B -= K
        K = 0
        break
    elif 0 < A : # ０＜A<Kの時、Aがなくなって
        K -= A
        A =0
    elif 0 <B and 0<K:
        K -= B
        B =0

print(A,B)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
x, y = 0, 0
if k < a:
    x, y = a - k, b
elif a < k < a + b:
    x, y = 0, a + b - k
else:
    x, y = 0, 0
print('{} {}'.format(x, y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
print(max(0, a-k), max(0, min(a-k, 0)+b-k))

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
print(max(0, a-k), max(0, (a+b-k)*(a <= k)))

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
a2 = max(a-k, 0)
b2 = b - (k - (a - a2))
print(a2, b2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

INF = float('inf')


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
t = A - K
print('%d %d' % (max(t, 0), max(t + B, 0)))

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
print('%d %d' % (A - K if A > K else 0, A + B - K if A + B > K else 0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int,input().split())
if K > A:
    a = 0
    b = abs(B-(K-A))
elif K == A:
    a = 0
    b = B
elif K < A:
    a = A - K
    b = B
elif K == 0:
    a = A
    b = B
print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b, k = [int(i) for i in input().split()]
maxs = max(0, a - k)
mins = min(0, a - k)
print(str(maxs) + " " + str(b + mins))

Submission status: Wrong Answer

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,k=INTM()
    if k<=a:
        a=a-k
    else:
        b=b-(k-a)
        a=0
    print(a,b)
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))





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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    A,B,K = map(int,input().split())
    print(max(0,K-A),max(0,K-A))
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

s = input().split()
t = [int(p) for p in s]

#print(t)
A = t[0]
B = t[1]
K = t[2]



a = max(0, A - K)
#print(a)

b = min(B, B - K + A)
#print(b)
print('{} {}'.format(a, b))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int, input().split())
print( max(0,a-k), min([0,b,a+b-k]) )

Submission status: Wrong Answer

Solution code:
a,b,k=map(int, input().split())
print( max(0,a-k), min(b,a+b-k) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, input().split())
ans = min(a+b-k,0)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc149/tasks/abc149_b
# math
import sys
input = sys.stdin.readline
# int(input()) # 入力が1つ
# map(int, input().split()) # 入力が複数
a, b, k = map(int, input().split())

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
a = min(a - k, 0)
k -= a
b = min(b-k, 0)
print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- 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()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC149.B
A,B,K = map(int,input().split())
if K<=A:
    print(A-K)
    print(B)
elif A <K and B-K-A <=0:
    print(0)
    print(B-K-A)
else:
    print(0)
    print(0)

Submission status: Wrong Answer

Solution code:
#ABC149.B
A,B,K = map(int,input().split())
if K<=A:
    print(A-K)
    print(B)
elif A <K:
    print(0)
    print(B-K-A)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A >= K:
    print(str(A-K) + " " + str(B))
else:
    print("0 " + str(A+B-K))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

def check(A,B,K):
    if 0 < K < A:
        A-=K
        K = 0
    else:
        result = K-A
        A = 0
        K = result
    if 0 < B:
        if K < B:
            B-=K
        else:
            B = 0
    return "{0} {1}".format(A,B)

print(check(A,B,K))

Submission status: Wrong Answer

Solution code:

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

def check(A,B,K):
    if A > 0:
        if A > K:
            A-=K
            K = 0
        else:
            result = K-A
            A = 0
            K = result
    if B > 0:
        B-=K
    return "{0} {1}".format(A,B)

print(check(A,B,K))

Submission status: Wrong Answer

Solution code:

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

def check(A,B,K):
    if A > K:
        A-=K
        K = 0
    else:
        result = K-A
        A = 0
        K = result
    B-=K
    return "{0} {1}".format(A,B)

print(check(A,B,K))

Submission status: Wrong Answer

Solution code:

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

def check(A,B,K):
    if A > K:
        A=-K
    else:
        result = K-A
        A = 0
        K = result
    B-=K
    return "{0} {1}".format(A,B)

print(check(A,B,K))

Submission status: Wrong Answer

Solution code:

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

def check(A,B,K):
    if A >= K:
        A=-K
    else:
        result = K-A
        A = 0
        K = result
    B-=K
    return "{0} {1}".format(A,B)

print(check(A,B,K))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

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

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K = list(map(int,input().split()))
if K <= A:
  print('{} {}'.format(A-K,B))
if A <= K <= A+B:
  print('{} {}'.format(0,A+B-K))
if A+B < K:
  print('{} {}'.format(0,0))

Submission status: Wrong Answer

Solution code:
A,B,K = list(map(int,input().split()))
for i in range(K):
  if A != 0:
    A -= 1
  if A == 0 and B != 0:
    B -= 1
print('{} {}'.format(A,B))

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
C = K - A
if A >= K:
  A -= K
  print(A, B)
else:
  A *= 0
  B -= C
  print(A,B)