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 bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

a, b, k = list(map(int, sys.stdin.buffer.readline().split()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, raw_input().split())
ta = a - a
ao = b - (k-a)
print('{0} {1}'.format(ta, ao))

Submission status: Wrong Answer

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

print(a,b)

Submission status: Wrong Answer

Solution code:
str=input().split(" ")

a = int(str[0])
b = int(str[1])
c = int(str[2])

taka = a - c
if taka < 0:
    taka = 0
ao = b - c + a
if taka > 0:
    ao = c
if ao < 0:
    ao = 0

print(taka, end = " " )
print(ao)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

constraints = (a >= 0) and (a <= 10**12) and (b >= 0) and (b <= 10**12) and (k >= 0) and (k <= 10**12)
if(constraints):
  while (k > 0 or b > 0):
    if(a > 0):
      a = a - 1 
    else: 
      b = b - 1 
    k = k - 1
  print("%d %d" %(a, b))
     
else: 
  print("Invalid constraints.")

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:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, K: int):
    ans_b = B
    a = A - K
    if a < 0:
        ans_b -= K
        ans_b += A
    print(max(a, 0), ans_b)


# 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  = list(map(int, input().split()))
for i in range(K):
    if K>=A and K>=B:
        A=0
        B=0
        break
    elif A >= 1:
        A = A-1
    elif B >= 1:
        B = B-1
    elif A == 0 and B == 0:
        break
print(A,B)

Submission status: Wrong Answer

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

if K > A and K > B:
    print(str(0)+' '+str(0))

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

Submission status: Wrong Answer

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

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

else:
    k = k - a
    a = a - k

b = b - k

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin


A,B,K= stdin.readline().rstrip().split() 

A=int(A)
B=int(B)
K=int(K)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = 0
b = 0

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

print(a,b)

Submission status: Wrong Answer

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

print(a,b)

Submission status: Wrong Answer

Solution code:
input_list = list(map(int, input().split()))
takahashi = input_list[0]
aoki = input_list[1]
turn = input_list[2]
if takahashi >= turn:
    takahashi -= turn
else:
    takahashi = 0
    turn = turn - takahashi
    if turn > aoki:
        aoki = 0
    else:
        aoki -= turn
print(takahashi, aoki)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ip = raw_input().split()
a = int(ip[0])
b = int(ip[1])
k = int(ip[2])
if k > a:
  k = k - a
  a = 0
  b = 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()]

a = A
b = B

if K > A:
    a = 0
    b = B - (K - A)

else:
    a = A - K
    b = B

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

Submission status: Wrong Answer

Solution code:

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

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





if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

def print_ans(A,B,least,more):
    if min(A,B)==A:
        print(least,end=" ")
        print(more)
    else:
        print(more,end=" ")
        print(least)


if A+B<=K:
    print("0 0")
elif A==B:
    print(A,end=" ")
    print(B)
else:
    least = min(A,B)
    more = max(A,B)  
    if K>=least: 
        K-=least 
        least=0
        more-=K
        print_ans(A,B,least,more)
    else: 
        least-=K
        K=0
        print_ans(A,B,least,more)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a , b ,c =map(int,input().split())
A = a
B = b
C = c
if c >= a:
    a = 0
else:
    a = a - c
if C - A >= B:
    b = 0
else:
    b = B - C + A
ans = str(a) + str(" ") + str(b)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if K > A:
    K = K - A
    A = 0
    if K >= B:
        K = K - B
        B = 0
    if B > K:
        B = B - K
        print(A, end="")
        print(B)
        exit(0)
    
    
for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    if A == 0 and B == 0:
        break

print(A, end=" ")
print(B)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

a,b,k = map(int, sys.stdin.readline().split())

a, b  = max(0, a-k), b- max((k-a), 0)
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 and (A + B) > K:
    print(0, A + B - K)
else:
    print(0, 0)

Submission status: Wrong Answer

Solution code:
from sys import stdin


A,B,K= stdin.readline().rstrip().split() 

A=int(A)
B=int(B)
K=int(K)

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

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

Submission status: Wrong Answer

Solution code:
def f(A,B,K):
    a=A-min(A,K)
    b=B-(K-min(A,K))
    return a,b
A,B,K= map(int,input().split())
a=f(A,B,K)
print(a[0],a[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8

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

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

Submission status: Wrong Answer

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

def print_ans(A,B,least,more):
    if min(A,B)==A:
        print(least,end=" ")
        print(more)
    else:
        print(more,end=" ")
        print(least)


if A==B:
    print(A,end=" ")
    print(B)
else:
    least = min(A,B)
    more = max(A,B)
    if A+B<K:
        print("0 0")
    elif K>=least: 
        K-=least 
        least=0
        more-=K
        print_ans(A,B,least,more)
    else: 
        least-=K
        K=0
        print_ans(A,B,least,more)

Submission status: Wrong Answer

Solution code:
#gather input (cookies)
A, B, K = map(int, input().lower().split())

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

print(A, B)

Submission status: Wrong Answer

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


def solve(A: float, B: float, K: float):
    a = A - K
    if a < 0:
        ans_b = B + a
    else:
        ans_b = B
    print(int(max(a, 0)), int(ans_b))


# 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 = float(next(tokens))  # type: float
    B = float(next(tokens))  # type: float
    K = float(next(tokens))  # type: float
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#coding:utf-8
import sys
 
 
def main():
    list1  = list(map(int, input().split(' '))) 
    a, b, k = list1
  
    if a > k:
        a = a - k
      
    else:
        b = b - (k - a)
        a = 0
    print(a, b)
    
    
  
    return 0
 
 
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A, B, K = map(int, raw_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 > 1000000:
    a = int(a / 1000000)
if b > 1000000:
    b = int(b / 1000000)
for i 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-k<=0:
    b-=abs(a-k)
    a=0
else:
    a-=k

print(a,b)

Submission status: Wrong Answer

Solution code:
# Setup
a,b,c = [int(i) for i in input().split()]
while True:
    if c <= a:
        a -= c
        print(a, b)
        break
    else:
        if b >= c:
            c -= a
            a = 0
            b -= c
            print(a, b)
            break
        else:
            print(0, 0)
            break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def solve(A: int, B: int, K: int):
    a = float(A) - float(K)
    if a < 0:
        ans_b = float(B) + a
    else:
        ans_b = B
    print(max(int(a), 0), int(ans_b))


# 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 = list(map(int,input().split()))
A = a[0]
B = a[1]
N = a[2]

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
li = [int(i) for i in input().split()]
A = li[0]
B = li[1]
K = li[2]
t = 0
a = 0
if A - K < 0 :
    d = K - A
    a = B - d
    if a <= 0 :
        a = 0
else :
    t = a - K
print(t,a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

  print(A, B)

else:
  print(0, 0)

Submission status: Wrong Answer

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

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

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

print(a, b)

Submission status: Wrong Answer

Solution code:
# your code goes here
a,b,c=map(int,input().split())
if a+b==c:
	print("0 0")
elif a>c:
	print(a-c,"",b)
elif c>=a:
	i=c-a;
	if(b>i):
		j=b-i
	else:
		j=i-b
	print("0 ",j)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
A,B,K=(int(x) for x in input().split())
a,b,k=A,B,K
if A<=K:
  a=0
  k=k-A
  if b<=k:
    b=0
  else:
    b=b-k
print(str(a)+" "+str(b))

Submission status: Wrong Answer

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

jdg = K - A
A = A - min(A, K)
B = B - max(0, jdg)

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import exit
a, b, k = map(int, input().split(" "))

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

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

Submission status: Wrong Answer

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

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

print(A,B)

Submission status: Wrong Answer

Solution code:
number = input()
a,b,k = [int(ele)for ele in number.split(' ')]
res = a - k
if res < 0:
    a = 0
    b = b + res
else:
    a = res
print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8

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

tr = 0
ar = 0

if A == B and A < K and B < K:
    print('0 0')
else:
    if A <= K and B <= K:
        if A > B:
            print('{} 0'.format(A - B))
        else:
            print('0 {}'.format(B - A + 1))
    else:
        print('{} {}'.format(A - K, B - K))

Submission status: Wrong Answer

Solution code:
A,B,K = map(int,input().split())
if K == 0:
    print(A,B)
elif 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:
def acinput():
    return list(map(int, input().split(" ")))


A,B,K=acinput()

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

print(A,B)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

def main()->None:
    A, B, K = map(int, input().split())
    range_K = range(K)
    
    diff = B - A
    if diff > 0:
        print(0, B-diff)
    else:
        print(0,0)





if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A >= K:
    print('{0} {0}'.format(A - K, B))
    
elif A + B >= K:
    print('0 {0}'.format(A + B - K))
    
else:
    print('0 0')

Submission status: Wrong Answer

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
k=int(s[2])
if k>=i:
  i=0
  j=j-k+i
  if j<0:
    j=0
else:
  i=i-k
print(str(i)+" "+str(j))

Submission status: Wrong Answer

Solution code:
def main():
    #高橋a, 青木b, 繰り返す回数k
    a, b, k = map(int,input().split())
    if a >=1and a>k:
        lest = a - k
        print(lest, b)
    elif a>=1 and a<k:
        lest = k - a
        ans = b - lest
        print(0, ans)
    else:
        print(0, b - k)
    
main()

Submission status: Wrong Answer

Solution code:
# 2つの入力を空白で分割し、数値化
a, b, k = map(int, input().split())

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

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

print(str(ans_a) + " " + str(ans_b))

Submission status: Wrong Answer

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

if K <= A:
  print(str(A-K)+' '+str(B))
else:
  X = A+B
  print(str(0)+' '+str(X-K))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

elif a <= 0:
    b += a
    a = 0
    print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    numbers = input().split(" ")
    takahashi = int(numbers[0])
    aoki = int(numbers[1])
    repeat = int(numbers[2])
    if repeat == 0:
        pass
    elif takahashi >= repeat and takahashi > 0:
        takahashi -= repeat
    elif takahashi == 0 and aoki >= repeat:
        aoki -= repeat
    elif aoki == 0:
        takahashi -= min(takahashi, repeat)
    else:
        aoki += takahashi
        aoki -= repeat
        takahashi = 0

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

def resolve():
    if(A>K):
        ansA=int(A)-int(K)
        ansB=int(B)
    else:
        ansA=0
        ansB=int(B)-(int(K)-int(A))
    print(str(int(ansA))+" "+str(int(ansB)))

import sys
from io import StringIO
import unittest
#1000000000000 1000000000000 1000000000001
class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2 3 3"""
        output = """0 2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """500000000000 500000000000 1000000000000"""
        output = """0 0"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Wrong Answer

Solution code:

if __name__ == "__main__":
    A, B, K = input().split()
    A = int(A)
    B = int(B)
    for i in range(int(K)):
        if A != 0:
            A -= 0
        elif B != 0:
            B -= 1
        else:
            break
    print(str(A) + " " + str(B))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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



if A==B:
    print(A,end=" ")
    print(B)
else:
    least = min(A,B)
    more = max(A,B)
    if K>=least: 
        K-=least 
        least=0
    else: 
        least-=K
        K=0
    if K:
        more-=K
    if min(A,B)==A:
        print(least,end=" ")
        print(more)
    else:
        print(more,end=" ")
        print(least)

Submission status: Wrong Answer

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

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:

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

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8

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

tr = 0
ar = 0

if A == B and A < K and B < K:
    print('0 0')
else:
    if A > B:
        print('{} 0'.format(A - B))
    else:
        print('0 {}'.format(B - A + 1))

Submission status: Wrong Answer

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

print(str(max(0, a-k))+' '+str(max(0, a+b-k)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A-K<=0:
    B = abs(B-(K-A))
    A=0
    print(A,B)
else:
    A = A-K
    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 A>=1:
    if K>=A:
        K=K-A
        if K>=B:
            B=0
            print('0 0')
        elif K<B:
            B=B-K
            print('0 '+str(B))
    elif K<A:
        A=A-K
        print(str(A)+' '+str(B))

Submission status: Wrong Answer

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

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

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