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: Accepted

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

k = min(A, K)
K -= k
A -= k
k = min(B, K)
K -= k
B -= k
print A, B

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B,K=MI()
    A_=max(0,A-K)
    K=K-A
    if K>0:
        B=max(0,B-K)
    print(A_,B)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

Solution code:
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)
x = min(a, c)
a -= x
c -= x
y = min(b, c)
b -= y
c -= y
print(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


a,b,k = m()

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

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Runtime Error

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

if K<A:
    ans1=A-K
else:
    ans1=0
    ans2=max(A+B-K,0)

print(ans1,ans2)

Submission status: Runtime Error

Solution code:
import sys
A, B, K= map(int, next(sys.stdin.buffer))
x = min(A, B, K)
print(A - x, B - x)

Submission status: Runtime Error

Solution code:
import sys
A, B, K= map(int, sys.stdin.buffer)
x = min(A, B, K)
print(A - x, B - x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
if n == 1:
    print("Hello World")
else:
    A =int(input())
    B = int(input())
print(A + B)

Submission status: Runtime Error

Solution code:
n=int(input())
if n==1:
    print("Hello World")
else:
    a=int(input())
    b=int(input())
    print(a+b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
if N==1:print("Hello Word")
if N==2:
  A=int(input())
  B=int(input())
  print(A+B)

Submission status: Runtime Error

Solution code:
N=int(input())
if N==1:print("Hello Word")
if N==2:
    A=int(input())
    B=int(input())
    print(A+B)

Submission status: Runtime Error

Solution code:
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>

using namespace std;

//----------------------- Print Function ----------------------//

inline void print() {
    cout << endl;
}
template <typename First, typename... Rest>
void print(const First &first, const Rest &... rest) {
    cout << first << ' ';
    print(rest...);
}

//------------------------- Libraries -------------------------//

//--------------------------- Solve ---------------------------//

void solve() {
    long long A, B, K; cin >> A >> B >> K;
    
    if (K > A) {
        K -= A;
        A = 0;
        if (K > B) {
            K -= B;
            B = 0;
        }
        else {
            B -= K;
            K = 0;
        }
    }
    else {
        A -= K;
        K = 0;
    }

    print(A, B);
}

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    solve();

    return 0;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

A_after = A - K

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

Submission status: Runtime Error

Solution code:
data = map(int,input().split())
for i in range(data[2]):
  if data[0] >= 1:
    data[0] -= 1
  elif data[1] >=1:
    data[1] -=1
print(f'{data[0]} {data[1]}')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(after_a, after_b)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
K = int(input())

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

Submission status: Runtime Error

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

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

print( ’{} {}’.format( ans_t, ans_a))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(c):
  if(a == 0):
  	c -=1
  elif(a > 0):
    a -= 1
print(str(a),str(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


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


# Generated by 1.1.7.1 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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


def main():
    a,b,k = mi()

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


main()

Submission status: Runtime Error

Solution code:
def actual(a, b, k):
    if a >= k:
        # return f'{a - k} {b}'
        return '{} {}'.format((a - k), b)

    if b > (k - a):
        # return f'0 {b - (k - a)}'
        return f'0 {}'.format(b - (k - a))

    return '0 0'

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

Submission status: Runtime Error

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

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

  print(a+b)

Submission status: Runtime Error

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

takahashi = A
aoki = B

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

elif (a+b)<k:
  print('0','0')

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b, k = list(map(int, input().split()))
a_ans = a - min(a, k)
if a_ans == 0:
    b_ans = b - min(b, k - a)
print('{} {}'.format(a_ans, b_ans))

Submission status: Runtime Error

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

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

print(str(a) + ' ' + str(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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) if K>A+B

Submission status: Runtime Error

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)
else:
  print(0,0)

Submission status: Runtime Error

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial, gcd
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

a,b,k = map(int,input().split())
a1 = k-a
if a1 >=1:
  a2=b-a1
  if a2 <=0:
    a2 = 0
  a1=0
else:
  a1=a-k
  a2=b
print(f'{a1} {a2}')

Submission status: Runtime Error

Solution code:
import sys

a,b,k = map(int,input().split())
a1 = k-a
if a1 >=1:
  a2=b-a1
  a1=0
else:
  a1=a-k
  a2=b
print(f'{a1} {a2}')

Submission status: Runtime Error

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


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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

a = t[0]
b = t[1]
c = t[2]

for x in range(0,c):
    if a > 0:
        a -= 1
    elif a == 0 and b > 0:
        b -= 1

print(f"{a} {b}")

Submission status: Runtime Error

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

i=o
while i<k:
  if a>0:
    a=a-1
    i=i+1
  elif b>0:
    b=b-1
    i=i+1
print(a,b)

Submission status: Runtime Error

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


for _ in range(K):
    if A >= 1:
        A = A - 1
    elif A == 0 and B >=1:
        B = B - 1
    else:
        pass

print(A, B)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def cookie(t, s, p):
        if t > 0:
            t = t - 1
        elif s > 0:
            s = s - 1
        else:
            pass
        p -= 1
        if p > 0:
            cookie(t, s, p)
        return t, s
    
res = cookie(a, b, k)
t, s = res
print(t, s)

Submission status: Runtime Error

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

def cookie(t, s, p):
        if t > 0:
            t = t - 1
        elif s > 0:
            s = s - 1
        else:
            pass
        p -= 1
        if p > 0:
            cookie(t, s, p)
        return t, s
    
res = cookie(a, b, k)
print(res)

Submission status: Runtime Error

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

print(a1, b1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
//ABC149 B

#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for(int i = s; i < (int)(n); i++)
const lint mod = 1000000007;


lint ans = 0;
lint a,b,k;


int main() {
  cin >> a >> b >> k;
  
  if(a <= k){
    if(b <= k-a){
      a = 0;
      b = 0;
    }
    else{
      b -= k-a;
      a = 0;
    }
  }
  else{
    a -= k;
  }

  printf("%lld %lld\n",a,b);
}

Submission status: Runtime Error

Solution code:
//ABC149 B

#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for(int i = s; i < (int)(n); i++)
const lint mod = 1000000007;


lint ans = 0;
lint a,b,k;
string s,t;


int main() {
  cin >> a >> b >> k;
  
  if(a <= k){
    if(b <= k-a){
      a = 0;
      b = 0;
    }
    else{
      b -= k-a;
      a = 0;
    }
  }
  else{
    a -= k;
  }

  printf("%lld %lld\n",a,b);
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

print(answer)

Submission status: Runtime Error

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


print(str(maxs) + " " + str(b - maxs))

Submission status: Runtime Error

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

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


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

for i in range k:
  if a > 0:
    a = a - 1
  elif b > 0
  	b = b - 1

print(a, b)

Submission status: Runtime Error

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

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

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

print(f"{a} {b}")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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
elif a=0:
    if b != 0 and b >= k:
        b -= k
    elif b != 0 and b < k:
        b = 0

print(a, b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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