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:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:

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

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

print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

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

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

print(A, B)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline

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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

for i in range(K):
    if A>=1:
        A=A-1
    else:
        if B>=1:
            B=B-1
        else:
            exit()
print(A, B)

Submission status: Wrong Answer

Solution code:
x = input().split()
 
a = int(x[0])
b = int(x[1])
k = int(x[2])
 
if(a >= k):
  print(a-k,b)
elif(a < k and (a-k) <b):
  print(0,b-(k-a))
elif(a < k and (a-k) > b):
  print(0,0)

Submission status: Wrong Answer

Solution code:
x = input().split()

a = int(x[0])
b = int(x[1])
k = int(x[2])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
a = x[0] - x[2]
b = x[1]
c = x[2] - x[0]
if a <= 0:
  a = 0
if a <= 0 and b >= 0:
  b -= c
print(str(a)+' '+str(b))

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
a = x[0] - x[2]
b = x[1]
c = x[2] - x[0]
if a <= 0:
  a = 0
if b >= 0:
  b -= c
print(str(a)+' '+str(b))

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
a = x[0] - x[2]
c = x[2] - x[0]
b = x[1] - c
if a <= 0:
  a = 0
print(str(a)+' '+str(b))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# B - Greedy Takahashi

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

if A <= K:
    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())
if a>=k:
  print(a-k,b)
if b>=(k-a):
  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:
# B - Greedy Takahashi
A, B, K = map(int, input().split())

tmp = A - K

if tmp<=0:
    print(0, B+tmp)
else:
    print(tmp, 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())

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

Submission status: Wrong Answer

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

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

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

print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    k = 0 if k < 0 else k

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

    print(a, b)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

    k = 0 if k < 0 else k

    b = b - k if b > 0 else 0

    print(a, b)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

    b = b - k if b > 0 else 0

    print(a, b)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    a = a - k
    if a < 0:
        k = a * -1
        a = 0
    else:
        k = k - a
    
    b = b - k if b > 0 else 0

    print(a, b - k)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

    print(a, b - k)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

else:
    print(0,0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a, b, k = map(int, input().split())
    ans_a = max(a - k, 0)
    if ans_a == 0:
        k = k - a
    ans_b = max(b - k, 0)
    print(ans_a,ans_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:

def main():
    A, B, K = map(int, input().split())
    aa = A - K if A > K else 0
    bb = B - (K - A) if A < K else B
    print(aa, bb)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():
    A, B, K = map(int, input().split())
    aa = A - K if A > K else 0
    bb = B - (K - A) if A < K else 0
    print(aa, bb)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#N = int(input())
l = [int(x) for x in input().split()]
a = max(0,l[0]-l[1])
b = max(0,l[0]+l[1]-l[2]-a)
print(a,b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if A==0 and B>=1 and K>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>=1:
    K=K-A
    A=0
if A<0:
    A=0

if A==0 and B>=1 and K>=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:
    K=K-A
    A=0
if A<0:
    A=0
if A<=0 and 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:
    K=K-A
    A=0

if A<=0 and 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())

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

if A==0 and B>0 and k>0:
    B-=k
    

print(A,B)

Submission status: Wrong Answer

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

k=0
if A>0:
    k+=A
    A=0

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

print(A,B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def main():
    A, B, K = map(int, open(0).read().split())
    if (A > K):
        print(A - K, B)
    elif (B - (A - K) >= 0):
        print(0, B - (K - A))
    else:
        print(0, 0)



main()

Submission status: Wrong Answer

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

def main():
    A, B, K = map(int, open(0).read().split())
    if (K > A):
        print(0, B - (K - A))
    else:
        print(A - K, B)


main()

Submission status: Wrong Answer

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

def main():
    A, B, K = map(int, open(0).read().split())
    if (B - (K - A) >= 0):
        print(0, B - (K - A))
    else:
        print(0, 0)


main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

takahashi = max(0, a-k)
k -= a

aoki = max(0, b-k)

print(takahashi, aoki)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, B, K = rl()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,K=[int(x) for x in input().rstrip().split()]
import sys
# A=[int(x) for x in input().rstrip().split()]
if A==0 and B==0:
  print(0,0)
  sys.exit()

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

Submission status: Wrong Answer

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

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

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

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

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

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

if k>=a and k>=b:
  print('0 0')

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

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

elif k<=a<b:
  print(a-k, b-k)

elif k<=b<a:
  print(a-k, b-k)

Submission status: Wrong Answer

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


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

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


if __name__ == '__main__':
    main()

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

a = max(0, a - k);

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

Submission status: Wrong Answer

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

a = max(0, a - k);

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

Submission status: Wrong Answer

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

a = max(0, a - k);

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

Submission status: Wrong Answer

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

Solution code:
A, B, K = map(int,input().split())
if A >= 10**12 or B >= 10**12 or K >= 10**12:
  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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A >= 1:
    print(A-1, B)
elif B >= 1:
    print(A, B-1)
else:
    print(A, B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input().split()
a = int(n[0])
b = int(n[1])
k = int(n[2])

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

Submission status: Wrong Answer

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(a1,a2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b,k=map(int, input().split())
s = a-k if k<a else 0 
t = b if k<a else a+b-k
if (a-k)or(a+b-k): s,t=0,0
print('%d %d'%(s, t))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,k = list(map(int,input().split()))
if k-a<=0:
    print(a-k,b)
elif k-a>0:
    x = k-a
    y = b-x
    z = min(0,x)
    print(z,y)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a + b <= k:
    a = 0
    b = 0
elif a + b > k and a >= k:
    a = a - k
elif a < k:
    a = 0
    b = b - abs(a - k)

print(a, b)

Submission status: Wrong Answer

Solution code:
# ABC 149: B – Greedy Takahashi
A, B, K = [int(s) for s in 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:
from decimal import Decimal

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import deque

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

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

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

Submission status: Wrong Answer

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


def solve(A: int, B: int, K: int):
    if A >= K:
        A = 0
        K -= A
        if B >= K:
            B = 0
        else:
            B-=K
    else:
        A -= K
    print(A,B)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, K)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

A1=max(0,A-K)
B1=max(0,B-abs(A-K))

print(A1,B1)