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

Submission status: Wrong Answer

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

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

print(a, b)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = [int(x) for x in input().split()]
if a-k>=0:
    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 + b:
    ans_a = 0
    ans_b = 0
if a >= k:
    ans_a = a - k
    ans_b = b
else:
    ans_a = 0
    ans_b = b - (k - a)

print(ans_a, ans_b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

if A==0 and B==0:
    a,b = A,B
    print(a,b)
    exit()
elif A<K:
    a=0
    b=B-(K-A)
    print(a, b)
else:
    a=A-K
    b=B
    print(a, b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math

a, b, k = [int(x) for x in stdin.readline().rstrip().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+b<=k:
    print(0,0)
elif a==0 and b>=k:
    print(0,b-k)
elif a>=k and b==0:
    print(a-k,b)
else:
    print(a-k,b-(k-a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# import math
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np


a,b,k = map(int, input().split())
# n = int(input())
# p = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
A, B ,K = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
#スペース区切りの整数の入力
A, B ,K = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict

def load(vtype=int):
    return vtype(input().strip())

def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]

def exit():
    import sys
    sys.exit(0)

a, b, k = load_list()

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict

def load(vtype=int):
    return vtype(input().strip())

def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]

def exit():
    import sys
    sys.exit(0)

a, b, k = load_list()

print(a+b-k)

Submission status: Wrong Answer

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

if K == 0:
    print(A, K)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans_list = []

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int,input().split())
ans_a = a - k
if ans_a < 0:
    ans_a = 0
ans_b = b - abs(k - a)
if ans_b <= 0:
    ans_b = 0
print(str(ans_a) + " " + str(ans_b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ans = [max(0, A-K), max(B-(K-A), 0)]
print(' '.join(map(str, ans)))

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
ans = [0, max(B-(K-A), 0)]
print(' '.join(map(str, ans)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int,input().split())
print(" ".join(map(str,[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,A-K),max(0,B-(K-A)))

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A + B == K:
        ans = [0, 0]
    elif A + B < K:
        ans = [0, 0]
    elif K <= A:
        ans = [A-K, B]
    elif A < K <= B:
        ans = [0, B+A-K]
    elif K == 0:
        ans = [A, B]
    print(*ans)

# print(solve())
solve()

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A + B == K:
        ans = [0, 0]
    elif A + B < K:
        ans = [0, 0]
    elif K <= A:
        ans = [A-K, B]
    elif A < K <= B:
        ans = [0, B+A-K]
    print(*ans)

# print(solve())
solve()

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A+B <= K:
        ans = [0, 0]
    if A >= K:
        ans =[A-K, B]
    if A<K<=B:
        ans = [0, B+A-K]
    if K == 0:
        ans = [A, B]
    if A-K < 0:
        ans = [0, B+A-K]
    if A-K == 0:
        ans = [0, B]
    print(*ans)

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A-K < 0:
        ans = [0, B+A-K]
    elif A-K == 0:
        ans = [0, B]
    else:
        ans = [A-K, B]
    print(*ans)

# print(solve())

# def solve()が@return voidのとき
solve()

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A+B <= K:
        ans = [0, 0]
    if A >= K:
        ans =[A-K, B]
    if A<K<=B:
        ans = [0, B+A-K]
    if K == 0:
        ans = [A, B]
    print(*ans)

# print(solve())

# def solve()が@return voidのとき
solve()

Submission status: Wrong Answer

Solution code:
def solve():
    A, B, K = map(int, input().split())
    ans = []
    if A+B <= K:
        ans = [0, 0]
    if A >= K:
        ans =[A-K, B]
    if A<K<=B:
        ans = [0, B+A-K]
    print(*ans)

# print(solve())

# def solve()が@return voidのとき
solve()

Submission status: Wrong Answer

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


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,n=map(int,input().split()) 
print(max(a-n,0),max(b-max(a-n,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))
else:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

taka, aoki, times= map(int,input().split())

if taka + aoki > times:
    if taka < times:
        print(0,aoki - (times - taka))
    elif taka > times:
        print(taka - times, aoki)
    else:
        print(0,0)
else:
    print(0,0)

Submission status: Wrong Answer

Solution code:
taka, aoki, times= map(int,input("taka: ").split())


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

print(taka,aoki)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

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

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

Submission status: Wrong Answer

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


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

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

Takahashi = 0
Aoki = 0

Takahashi = a - k

if Takahashi <= 0:
    Aoki = b + Takahashi
    Takahashi = 0
else:
    Aoki = b

print(Takahashi , Aoki)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, input().split())
if A > K:
    print(A, B)
if A == K:
    print(0, B)
if A < K:
    print(0, B - (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 = [int(x) for x in input().split(" ")]

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

Submission status: Wrong Answer

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

if A >= K:
  print("{} {}".format(A-K, B))
elif A < K and A+B >= K:
  print("{} {}".format(0, A+B-K))
else:
  print(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+A-K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ansA = max(0, A-K)
ansB = max(0, B+(A-K))

print(ansA, ansB)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

num_eat_A = min([A, K])
num_eat_B = K - num_eat_A
if num_eat_B < 0:
  num_eat_B = 0

A_remain = A - num_eat_A
B_remain = B - num_eat_B

print("{} {}".format(A_remain, B_remain))

Submission status: Wrong Answer

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

num_eat_A = min([A, K])
if A < K:
  num_eat_B = K - num_eat_A
else:
  num_eat_B = 0
  
A_remain = A - num_eat_A
B_remain = B - num_eat_B

print("{} {}".format(A_remain, B_remain))

Submission status: Wrong Answer

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

num_eat_A = min([A, K])
if num_eat_A < K:
  num_eat_B = K - num_eat_A
else:
  num_eat_B = 0
  
A_remain = A - num_eat_A
B_remain = B - num_eat_B

print("{} {}".format(A_remain, B_remain))

Submission status: Wrong Answer

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

num_eat_A = min([A, K])
if num_eat_A < K:
  num_eat_B = K - num_eat_A
else:
  num_eat_B = B
  
A_remain = A - num_eat_A
B_remain = B - num_eat_B

print("{} {}".format(A_remain, B_remain))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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


print(a, b)

Submission status: Wrong Answer

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

if a >= 10 ** 12 or b >= 10 ** 12 or k >= 10 ** 12:
    a = 0
    b = 0
else:
    for _ in range(k):
        if a > 0:
            a -= 1
        else:
            if b > 0:
                b -= 1

print(a, b)

Submission status: Wrong Answer

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

print(10 ** 12)

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

print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A > K:
    A -= K
else:
    K -= A
    A = 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:
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

def main():
    a, b, k = list(map(int,input().split()))

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(A,B)

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

A, B, K = input_nums()

res_a = A - K if A >= K else 0
remain = K - A
res_b = B - remain if B >= remain else 0
print('{} {}'.format(res_a, res_b))

Submission status: Wrong Answer

Solution code:
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
ak = (k + 1) // 2
bk = k // 2

print(max(0, a - ak), max(0, b - bk))

Submission status: Wrong Answer

Solution code:
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
takahashi = a - min((k + 1) // 2, a)
aoki = b - min(k // 2, b)
print(takahashi, aoki)

Submission status: Wrong Answer

Solution code:
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from math import floor, ceil, sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict
from heapq import heappop, heappush, heappushpop
from itertools import product
import sys
stdin = sys.stdin
mod = 10**9 + 7


def ns(): return stdin.readline().rstrip()


def ni(): return int(ns())


def na(): return list(map(int, stdin.readline().split()))


a, b, k = na()
takahashi = a - min((k + 1) // 2, b)
aoki = b - min(k // 2, a)
print(takahashi, aoki)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, k = list(map(int, readline().split()))
    print(max(0, a - k), b - max(0, k - a))


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a_af = a - min(a,k)
b_af = b - (k - min(a,k))
print(a_af,b_af)

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

Submission status: Wrong Answer

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

if a > 0:
    al = a-k
    bl = b-k+a
    if al <= 0:
        al = 0
    if bl <= 0:
        bl = 0

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