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

aa = max (a - k, 0)
bb = max (a + b - k, 0)
print(f'{aa} {bb}')

Submission status: Wrong Answer

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

a -= k
if a < 0:
    b += a
    a = 0 
print(f'{a} {b}')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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=(int(x) for x in input().split())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = [int(x) for x in 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:
    k = k - a
    a = 0
    b = b - k
else:
    a = a - k

print(a,b)

Submission status: Wrong Answer

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

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


main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Sep  9 13:34:02 2020

@author: liang
"""

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

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

Submission status: Wrong Answer

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

if a >= k:
  print(a-k,b)
  sys.exit()

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
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+b<=k:
  print(0,0)
elif a<=k<a+b:
  print(0,b-(k-a))
else:
  print(a-k+b,b)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def cookie(a, b, n):
    a = abs(n-a)
    if a == 0:
        return [a, b]
    else:
        b = abs(b-a)
        return[0, b]

if __name__ == "__main__":
    a, b, n = map(int, input().split())
    j = cookie(a, b, n)
    print(j[0], j[1])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else:
    A -= K

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

Submission status: Wrong Answer

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

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

else:
    A -= K

if A < 0 and B < 0:
    print(0,0)
else:
    print(A,B)

Submission status: Wrong Answer

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

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

else:
    A -= K

print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
x,y,k=map(int,input().split())
m=min(x,y,k)
if(x==m):
    print(0,y-m+1)
elif(y==m or k==m):
    print(x-m,y-m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b, k = inpm()
ta = a - k
ao = b
if(ta < 0):
    ao = b - ta
    ta = 0
if(ao < 0):
    ao = 0
print(str(ta) + ' ' + str(ao))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a,b,k = inpm()

aa = min(a,k)
bb = max(0,k-aa)

print(a - aa,b - bb)

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a,b,k = inpm()

aa = min(a,k)
bb = k-aa

print(a - aa,b - bb)

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a,b,k = inpm()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if c>a:
  rem1=c-a
  rem2=abs(rem1-b)
  print(0,rem2)
elif c<a:
  rem=a-c
  print(rem,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 A+B>=K:
    print(0,B-(K-A))
else:
    print(0,0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    r = A + B - K

    a = min(r, B)
    t = r - a

    print(t, a)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(k):
  if a<k and b<k:
    a=0
    b=0
    break
  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())
print(a-k,b) if a>=k else print(0-b-k+a) if k<=a+b else print(0,0)

Submission status: Wrong Answer

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

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int,input().split())
if k<=a:
    print(a-k, b)
elif 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:
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:
def main():
    a, b, k = map(int, input().split())
    if k >= a:
        print(0, b-(k-a))
    else:
        print(a-k, b)
        
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("{} {}".format(max(0,a-k),max(0,b+a-k)))

Submission status: Wrong Answer

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

k1=(k+1)//2
k2=k//2
mn=min(a,b,k)
print("{} {}".format(max(0,a-k1),max(0,b-k2)))

Submission status: Wrong Answer

Solution code:
# abc149_b.py
# https://atcoder.jp/contests/abc149/tasks/abc149_b

# B - Greedy Takahashi /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# 高橋君は A枚、青木君は B枚のクッキーを持っています。
# 高橋君は以下の行動を K回繰り返します。
#     もし高橋君がクッキーを 1枚以上持っているなら、高橋君のクッキーを 1枚食べる。
#     そうでなく、もし青木君がクッキーを 1枚以上持っているなら、青木君のクッキーを 1枚食べる。
#     高橋君も青木君もクッキーを持っていないなら、何もしない。
# 高橋君と青木君が最終的に持っているクッキーの枚数をそれぞれ求めてください。

# 制約
#     0≤A≤1012
#     0≤B≤1012
#     0≤K≤1012
#     入力中のすべての値は整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A B K

# 出力
# 高橋君と青木君のそれぞれが最終的に持っているクッキーの枚数を出力せよ。

# 入力例 1
# 2 3 3

# 出力例 1
# 0 2

# 高橋君は次のように行動します。

#     高橋君はクッキーを 2枚持っているので、自分のクッキーを 1枚食べる。
#     高橋君はクッキーを 1枚持っているので、自分のクッキーを 1枚食べる。
#     高橋君はクッキーを持っておらず、青木君はクッキーを 3枚持っているので、青木君のクッキーを 1枚食べる。

# したがって、最終的に持っているクッキーの枚数は、高橋君が 0枚、青木君が 2枚になります。

# 入力例 2
# 500000000000 500000000000 1000000000000

# 出力例 2
# 0 0

# オーバーフローに注意してください。


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, B, K = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

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

    result = str(a) + ' ' + str(b)

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2 3 3']
        lines_export = ['0 2']
    if pattern == 2:
        lines_input = ['500000000000 500000000000 1000000000000']
        lines_export = ['0 0']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A_after = 0
B_after = 0

if A - K >= 0:
  A_after = A - K

elif A + B - K >= 0:
  B_after = B - (K - A)
  
print(A_after, B_after)

Submission status: Wrong Answer

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

A_after = A
B_after = B

A_after = A - K

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

Submission status: Wrong Answer

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

A_after = A - K
B_after = 0

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

Submission status: Wrong Answer

Solution code:
from sys  import stdin,stdout

import bisect

import math

def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

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

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

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
        a*=a
        n=n>>1
    return r


def solve():

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



for _ in range(1):
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tmp = min(k, a)
a -= tmp
k -= tmp
b -= k

print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, K = [int(s) for s in input().split(' ')]
print(max(0, A - K), max(0, (B - (K - A))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if not ( 0 <= A <= 10**12 and 0 <= B <= 10**12 and 0 <= K <= 10**12 ): sys.exit()
if not ( isinstance(A,int) and isinstance(B,int) and isinstance(K,int) ): sys.exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
    
    a,b,k = map(int, input().split())
    if a < k and b < k:
        print(0,0)
        sys.exit()
    else:    
        for i in range(k):
            if a > 0:
                a = a-1
            if a <= 0 and b > 0:
                b = b-1
                break
        print(a,b)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if K <= A:
    print("{} {}".format(A-K, B))
elif K > A:
    print("0 {}".format(B-(K-A)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def greedyTakahashi(a, b, k):

    a -= k

    if a < 0:
        return (0, b+a) if b+a > 0 else (0, 0)
    else :
        return (a, b)

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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