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:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

a,b,k = get_nums_l()

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

Submission status: Wrong Answer

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:
        exit()
print('{} {}'.format(a, b))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

x = max(0,a-k)
y = b;
if x == 0:
    y += a - k

print(x,y)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b, k = na()
res = k
if a > 0:
    i = min(k, a)
    res = k - i
    if res == 0:
        print(a - i, b)
if res > 0:
    i = min(res, b)
    res -= i
    if res > 0:
        print(0, 0)
    else:
        print(0, b - i)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b, k = na()
res = k
if a > 0:
    i = min(k, a)
    res = k - i
    if res == 0:
        print(a - res, b)
if res > 0:
    i = min(res, b)
    res -= i
    if res > 0:
        print(0, 0)
    else:
        print(0, b - i)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

a, b, k = na()
res = k
if a > 0:
    i = min(k, a)
    res = k - i
    if res == 0:
        print(a - res, b)
i = min(res, b)
res -= i
if res > 0:
    print(0, 0)
else:
    print(0, b - i)

Submission status: Wrong Answer

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

t = a[0] -a[2];

if t<0:
    a[1] = a[1] +t
    t = 0

print("%d %d"%(t,a[1]))

Submission status: Wrong Answer

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

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

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        print("%d %d"%(a[0],a[1]))
    if(a[1] >= (a[2]+a[0])):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
        print("%d %d"%(a[0],a[1]))
    else:
        a[0] = a[0] -a[2]
        a[2] = a[2] -a[0]
        a[1] = a[1] -a[2]
    print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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

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

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        print("%d %d"%(a[0],a[1]))
    elif(a[1] >= (a[2]+a[0])):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
        print("%d %d"%(a[0],a[1]))
    else:
        a[1] = 0
        a[0] = 0
    print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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

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

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        print("%d %d"%(a[0],a[1]))
    elif(a[1] >= a[2]):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
        print("%d %d"%(a[0],a[1]))
    else:
        a[1] = 0
        a[0] = 0
    print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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

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

else:
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
        a[2] = 0
        a[2] = a[2] - a[0]
    elif(a[1] >= a[2]):
        a[0] = 0
        a[1] = a[1] -a[2]
    else:
        a[1] = 0
print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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]):
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
    elif(a[1] >= a[2]):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
    else:
        a[1] = 0
    print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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]):
    if(a[0] >= a[2]):
        a[0] = a[0] -a[2]
    elif(a[1] >= a[2]):
        a[2] = a[2] - a[0]
        a[0] = 0
        a[1] = a[1] -a[2]
    else:
        a[1] = 0
    print("%d %d"%(a[0],a[1]))

Submission status: Wrong Answer

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

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

A = (l[0]-l[2])*(l[0]-l[2] > 0)
B = l[1] - (-(l[0]-l[2]))*(l[0]-l[2] < 0)
print(A,B)

Submission status: Wrong Answer

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    A, B, K = read_int_list()
    a = A - K
    if a < 0:
      a = 0
    
    b = B - abs(A - K)
    if A > K:
      b = B

    if A == 0 and B == 0:
      a = b = 0
    print(a, b)


main()

Submission status: Wrong Answer

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    A, B, K = read_int_list()
    a = A - K
    if a < 0:
      a = 0
    b = B - abs(A - K)
    print(a, b)


main()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(a_c, b_c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b < 0:
    print(0, 0)

else:
    print(A-K, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a - k >= 0:
    print("{} {}".format(a - k, b))
else:
    print("{} {}".format(0, a + b - k))

Submission status: Wrong Answer

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

c = a - k


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

Submission status: Wrong Answer

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

c = a - k


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans_a = 0
ans_b = 0
ans_a = max(0,a-k)

if( ans_a == 0):
    ans_b = max(0, b-(k-a))


print("{0} {1}".format(ans_a,ans_b))

Submission status: Wrong Answer

Solution code:
N,M,L = (int(x) for x  in input().split())

if N >= L:
  print(N-L,M)
else:
  print(0,M-L+N)

Submission status: Wrong Answer

Solution code:
N,M,L = (int(x) for x  in input().split())

if N > L:
  print(N-L,M)
else:
  print(0,M-L+N)

Submission status: Wrong Answer

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

if K % 2 == 0:
    if A < 0:
        A = 0
    elif B < 0:
        B = 0
    print(abs(A-K//2), abs(B - K//2))

else:
    if A < 0:
        A = 0
    elif B < 0:
        B = 0
    print(abs(A-(K//2+1)), abs(B - K//2))

Submission status: Wrong Answer

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

if K % 2 == 0:
    print(abs(A-K//2), abs(B - K//2))

else:
    print(abs(A-(K//2+1)), abs(B - K//2))

Submission status: Wrong Answer

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

if K % 2 == 0:
    print(A-K//2, B - K//2)

else:
    print(A-(K//2+1), B - K//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(A-K if A >= K else 0, end=" ")
print(B-(K-A) if A < K else B)

Submission status: Wrong Answer

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

print(A-K if A >= K else 0, end=" ")
print(B-(K-A) if A < K else 0)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("{} {}".format(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:
  t=K-A
 
  print("0"+" "+str(B-t))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

if A >= K:
    A -= K
elif A < K and B >= K:
    B -= K - A
    A = 0
elif A < K and B < K:
    A = 0
    B = 0

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

Submission status: Wrong Answer

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

if A == 0 and B == 0:
    pass
elif A >= K:
    A -= K
elif A < K and B >= K:
    B -= K - A
    A = 0
elif A < K and B < K:
    A = 0
    B = 0

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(a, b)

Submission status: Wrong Answer

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

if a == b and a + b == k:
	print(str(0) + " " + str(0) )

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

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

Submission status: Wrong Answer

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

A,B = max(0,A-K),max(0,B-K+A)
print("{} {}".format(A,B))

Submission status: Wrong Answer

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

    B = max(0, B-(K-A))
    A = max(0, A-K)
    print("{} {}".format(A, B))

if __name__ == '__main__':
    main()

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

A = max(a-k,0)
B = b-max(k -a,0) 

print(A,B)

Submission status: Wrong Answer

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

a = A - K
k = K - A
b = B - k

if a <= 0:
    a = 0
if b <= 0:
    b = 0

print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

cA = A
cB = B

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

print(cA,cB)

Submission status: Wrong Answer

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
        print(TIMES)
    elif cB > 0:
        cB=cB-1
        print(TIMES)
    else:
        break

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

A,K = A-K, K-A

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

b_end = min(a_end,0) + b
print(max(a_end,0),b_end)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = A
aoki = B
if K < A:
    aoki = B
    taka = A - K
elif K>=(A+B):
    pass
else:
    taka = 0
    b = K - A
    aoki = B - b
print(str(taka)+" "+str(aoki))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = A
aoki = B
if K < B:
    aoki = B
    taka = A - K
elif K>=(A+B):
    pass
else:
    taka = 0
    b = K - A 
    aoki = B - b
print(str(taka)+" "+str(aoki))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = 0
aoki = 0
if K < B:
    aoki = A
    taka = B - K
elif K>=(A+B):
    pass
else:
    taka = 0
    b = K - B
    aoki = A - b
print(str(taka)+" "+str(aoki))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
taka = 0
aoki = 0
if K < B:
    taka = A
    aoki = B - K
elif K>=(A+B):
    pass
else:
    aoki = 0
    b = K - B
    taka = A - b
print(str(taka)+" "+str(aoki))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)

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

Submission status: Wrong Answer

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

def read_ints(row):
    return list(map(int, row().split()))
  
A ,B ,K = read_ints(row)

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

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

if T>=K:
	T=T-K

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split(' ')))
"""takahashi has a
   aoki has b
   loop k

for _ in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  elif a == 0 and b == 0:
    break
"""
if a - k < 0:
  k = k - a
  a = 0
elif a -k >= 0:
  k = k - a
  a = a - k

if b -k < 0:
#  k = k - b
  b = 0
elif b -k >= 0:
#  k = k - b
  b = b - k

print(a,b)

Submission status: Wrong Answer

Solution code:
A,B,K = [int(i) for i in input().rstrip().split(' ')]
if K >= A:
    A,K = 0,K-A
    B -= K
else:
    A -= K
print(A,B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A > K:
    print(A - K , B)

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

else:
    print("0 0")