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())
'''
for i in range(K):
  if A > 0:
    A -= 1
  elif B > 0:
    B -= 1
  else:
    break
'''

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = A-K
if a < 0:
  A = 0
  B = max(0, B+a)

print(a, B)

Submission status: Wrong Answer

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

a = A-K
if a < 0:
  A = 0
  B = max(0, B+a)

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b, c = input().split()
x = int(a)
y = int(b)
z = int(c)
if z >= x:
    z -= x
    x = 0

else:
    x -= z
    z = 0

if z >= y:
    z -= y
    y = 0

else:
    y -= z
    z = 0

Submission status: Wrong Answer

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

print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tc, ac, tasks = map(int, input().split())

ac -= (tasks - tc)
tc = 0

if ac < 0:
  tc += abs(ac)
  ac += abs(ac)
  
print(tc, ac)

Submission status: Wrong Answer

Solution code:
tc, ac, tasks = map(int, input().split())

tasks -= tc
ac -= tc
tc = 0

if ac < 0:
  tc += abs(ac)
  ac += abs(ac)
  
print(tc, ac)

Submission status: Wrong Answer

Solution code:
tc, ac, tasks = map(int, input().split())

tasks -= min(tc, ac)
ac -= min(tc, ac)
tc -= min(tc, ac)

while tasks > 0:
  if tc > 0: tc -= 1
  if ac > 0: ac -= 1
  tasks -= 1
  
print(tc, ac)

Submission status: Wrong Answer

Solution code:
tc, ac, tasks = map(int, input().split())

while tasks > 0:
  if tc > 0: tc -= 1
  if ac > 0: ac -= 1
  tasks -= 1
  
print(tc, ac)

Submission status: Wrong Answer

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



if a[0]+a[1] <= a[2]:
    print(0,0)
        
else:
    for I in range(a[2]):
        if a[0] and a[1] == 0:
            print(0,0)
            break
        elif a[0]>=1:
            a[0] = a[0]-1
            if I == a[2]-1:
                print(a[0],a[1])
        elif a[0] < 1 and a[1]>=1:
            a[1] = a[1]-1
            if I == a[2]-1:
                print(a[0],a[1])

Submission status: Wrong Answer

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


for I in range(a[2]):
    if a[0] and a[1] == 0:
        print(0,0)
        break
    elif a[0]+a[1] < a[2]:
        print(0,0)
        break
    elif a[0]>=1:
        a[0] = a[0]-1
        if I == a[2]-1:
            print(a[0],a[1])
    elif a[0] < 1 and a[1]>=1:
        a[1] = a[1]-1
        if I == a[2]-1:
            print(a[0],a[1])

Submission status: Wrong Answer

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


for I in range(a[2]):
    if a[0] and a[1] == 0:
        print(0,0)
        break
    elif a[0]+a[1] < a[2]:
        print(0,0)
        break
    elif a[0]>=1:
        a[0] = a[0]-1
        if I == 2:
            print(a[0],a[1])
    elif a[0] < 1 and a[1]>=1:
        a[1] = a[1]-1
        if I == 2:
            print(a[0],a[1])

Submission status: Wrong Answer

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

if a[0]  > 10000000000000:
    print(0,0)
elif a[1] > 10000000000000:
    print(0,0)
elif a[2] > 10000000000000:
    print(0,0)
else:
    for I in range(a[2]):
        if a[0] and a[1] == 0:
            print(0,0)
            break
        elif a[0]>=1:
            a[0] = a[0]-1
        elif a[0] < 1 and a[1]>=1:
            a[1] = a[1]-1
print(a[0],a[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, k = map(int, input().split())
if a==0 and b==0:
    print(0, 0)
elif k>a:
    print(2)
    print(0, end=" ")
    print(abs(b-(k-a)))
elif k<a:
    print(3)
    print(a-k, b)
elif a==k:
    print(4)
    print(0, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 149 B

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

if k <= a or k <= b:
    for i in range(k):
        if a >= 1:
            a -= 1
        elif b >= 1:
            b -= 1
    print(a, b)

else:
    print(0, 0)

Submission status: Wrong Answer

Solution code:
import sys

def S(): return sys.stdin.readline().rstrip()

A,B,K = map(int,S().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:
import sys

def S(): return sys.stdin.readline().rstrip()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 149 B

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

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

print(a, b)

Submission status: Wrong Answer

Solution code:
# 149 B

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

if k <= a or k <= b:
    for i in range(k):
        if a >= 1:
            a -= 1
        elif b >= 1:
            b -= 1
else:
    a = b = 0
    
print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(A)
print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


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

    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if k <= a:
    a -= k
elif a < k <= a + b:
    a = 0
    b -= k - a
else:
    a = 0
    b = 0
print('{} {}'.format(a, b))

Submission status: Wrong Answer

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

print(A, B)

Submission status: Wrong Answer

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

print(A, B)

Submission status: Wrong Answer

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

print(A, B)

Submission status: Wrong Answer

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

if a>=k:
    x,y=a-k,b
elif a+b <= k:
    x,y=0,b-(k-a)
else:
    x,y=0,0
print('{} {}'.format(x,y))

Submission status: Wrong Answer

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

if a>=k:
    x,y=a-k,b
else:
    x,y=0,b-(k-a)
print('{} {}'.format(x,y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=map(int,input().split())
flag_1=False
flag_2=False
flag_3=False

if (A-K)>=0:
  flag_1=True
else:
  if (B-(K-A))>=0:
    flag_1=False
    flag_2=True
  else:
    flag_2=False
    flag_3=True
if flag_1==True:
  print(print(A-K,B))
elif flag_2==True:
  print(0,B-(K-A))
else:
  print(0,0)

Submission status: Wrong Answer

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

taka -= min(A, K)
ao -= K - min(A, K)
print(taka, ao)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    return '0 {}'.format(b - (k - a))


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

Submission status: Wrong Answer

Solution code:
def actual(a, b, k):
    if a >= k:
        return (a - k), b

    return 0, b - (k - a)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tk, ao, k = map(int, input().split())


if tk == ao:
    tk = 0
    ao = 0
    print(str(0) + str(0))

else:
    for i in range(k):
        if tk >= 1:
            tk -= 1
        elif ao >= 1:
            ao -= 1
        elif tk == 0 and ao == 0:
            break
    print(str(tk) +' '+str(ao))

Submission status: Wrong Answer

Solution code:
tk, ao, k = map(int, input().split())


if tk == ao:
    tk = 0
    ao = 0

else:
    for i in range(k):
        if tk >= 1:
            tk -= 1
        elif ao >= 1:
            ao -= 1
        elif tk == 0 and ao == 0:
            break
    
print(str(tk) +' '+str(ao))

Submission status: Wrong Answer

Solution code:
tk, ao, k = map(int, input().split())


for i in range(k):
    if tk == ao:
        tk = 0
        ao = 0
    break

    if tk >= 1:
        tk -= 1
    elif ao >= 1:
        ao -= 1
    elif tk == 0 and ao == 0:
        break
    
print(str(tk) +' '+str(ao))

Submission status: Wrong Answer

Solution code:
tk, ao, k = map(int, input().split())


for i in range(k):
    if tk == ao:
        tk = 0
        ao = 0
        break
    elif tk >= 1:
        tk -= 1
    elif ao >= 1:
        ao -= 1
    elif tk == 0 and ao == 0:
        break
    
print(str(tk) +' '+str(ao))

Submission status: Wrong Answer

Solution code:
import math

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

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

if a == min(a,b):
    if 2*a >= k:
        print((a-math.ceil(k/2)), (b-math.floor(k/2)))
    else:
        k -= 2*a
        print(0, (b-a-k))
else:
    if 2*b >= k:
        print((a-math.ceil(k/2)), (b-math.floor(k/2)))
    else:
        k -= 2*b
        print((a-b-k), 0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

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

    
    
main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(a,b)

Submission status: Wrong Answer

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

if a > 0:
    fa = a - k
    a = a - k
    if a < 0:
        a = 0
    if b > 0:
        b = b - abs(fa)
        if b < 0:
            b = 0
elif b > 0:
    b = b - k
    if b < 0:
        b = 0
        
print(a, b)

Submission status: Wrong Answer

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

if a > 0:
    fa = a - k
    if fa < 0:
        a = 0
    if b > 0:
        b = b - abs(fa)
        if b < 0:
            b = 0
            
print(a, b)

Submission status: Wrong Answer

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

fa = a - k

if fa < 0:
    b = b - abs(fa)
    fa = 0

print(fa, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b, k = [int(i) for i in input().split()]
if 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: Wrong Answer

Solution code:
a, b, k = [int(i) for i in input().split()]
if 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: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = map(int, raw_input().split(' '))
r = [a,b]
if k >=0:
	m = min(k,a)
	a -= m
	k -= m

if k >=0:
	m = min(k,b)
	b -= m
	k -= m
print '{} {}'.format(r[0],r[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#python 3.7.1


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

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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

print(A, B)

Submission status: Wrong Answer

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

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

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


print(A, B)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B, K = [int(x) for x in input().split()]

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




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if t == a-k:
  print(t,b)
  exit()
else:
  b -= abs(a-k)

print(0,b)