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

Solution code:
class CookieCalc:
  def __init__(self, t_cookie, a_cookie):
    self.takahashi_cookie = t_cookie
    self.aoki_cookie = a_cookie
    
  def eat_cookie(self):
    if self.takahashi_cookie > 0:
      self.takahashi_cookie-=1
    elif self.aoki_cookie > 0:
      self.aoki_cookie -= 1
      
  def sum_cookie(self):
    return self.takahashi_cookie + self.aoki_cookie
      
t_cookie,a_cookie,K = [int(s) for s in input().split()]
cookie = CookieCalc(t_cookie, a_cookie)
 
for i in range(K):
  cookie.eat_cookie()
  if sum_cookie == 0:
    break
    
  
print(cookie.takahashi_cookie, cookie.aoki_cookie)

Submission status: Runtime Error

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

a = max(A - K, 0)
print(f"{a} {B - max(K - A, 0)}")

Submission status: Runtime Error

Solution code:
A,B,K = input().split()
x=0
while (int(A)>0):
  x=int(x)+1
  A=int(A)-1
  if(x>int(K)):
    break
while (int(B)>0):
  x=int(x)+1
  B=int(B)-1
  if(x>int(K)):
    break
if(A>0):
  A=int(A)+1
if(B>0):
  B=int(B)+1
print(format(A)+' '+format(B))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
K =int(input())
i = 0
for i in range(K):
    if A!=0:
        A = A -1
    else:
        B = B - 1

print(A, B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

if k >= a+b:
  c = d = 0

elif k == a:
  c = 0

elif k > a:
  c = 0
  d = b - (k - a)

else:
  c = a - k
  
print(c,d)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
  [a, t, k] = [int(i) for i in input().split()]
  if a + t >= k:
    a = 0
    t = 0
  elif a >= k:
    a = 0
    t = t - (k -a)
  else:
    a = a - k:

if __name__ == "__main__":
  main()

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
ea=min(A,K)
A-=ea
K-=ea
eb=min(B,K)
B-=eb
k-=eb
print(A,B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

t_num = int(List[0])
a_num = int(List[1])
times = int(List[2])

return_zero = times - (t_num + a_num)

if return_zero >= 0:
  print("0 0")
else:
  while times >=0:
    times -= 1
    if t_num >= 1:
      t_num -= 1
    elif t_num == 0 and a_num >= 1:
      a_num -= 1
    elif t_num ==0 and a_num == 0:
      t_num = t_num
      a_num = a_num
  
  print(t_num +" "+ a_num)

Submission status: Runtime Error

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

for i in K:
  if A >= 1:
    A -= 1
  elif A==0 and B>=1:
    B -= 1
  else:
    break

print(A, ' ', B)

Submission status: Runtime Error

Solution code:
n = [int(e) for e in input().split(" ")]
ans = None
if(n[0] >= n[2]):
    ans = f"{n[0] - n[2]} {n[1]}"
else:
    p = n[2] - n[0]
    if(n[1] <= p):
        ans = "0 0"
    else:
        ans = f"0 {n[1] - p}"
print(ans)

Submission status: Runtime Error

Solution code:
n = [int(e) for e in input().split(" ")]
ans = None
if(n[0] >= n[2]):
    ans = f"{n[0] - n[2]} {n[1]}"
else:
    p = n[2] - n[0]
    if(n[1] <= p):
        ans = "0 0"
    else:
        ans = f"0 {n[1] - p}"
print(ans)

Submission status: Runtime Error

Solution code:
n = [int(e) for e in input().split(" ")]
for i in range(n[2]):
    if(0 < n[0]):
        n[0] -= 1
    elif(0 < n[1]):
        n[1] -= 1
print(n[0] + " " + n[1])

Submission status: Runtime Error

Solution code:
a = input().split()
a = [int(i) for i in a]
 
for i in range(a[2]):
  if a[0] > 0:
    a[0] = a[0]-1
  elif a[1] > 0:
    a[1] = a[1] -1
  elif a[0] <= 0 and a[1] <= 0:
    pass

b = []
b.append(str(a[0])
b.append(str(a[1])

Submission status: Runtime Error

Solution code:
a = input().split()
a = [int(i) for i in a]
 
for i in range(a[2]):
  if a[0] >= 0:
    a[0] = a[0]-1
  elif a[1] >= 0:
    a[1] = a[1] -1
  elif a[0] <= 0 and a[1] <= 0:
    pass
 
b = []
b.append(str(a[0])
b.append(str(a[1])

Submission status: Runtime Error

Solution code:
a = input().split()
a = [int(i) for i in range(3)]
 
for i in range(a[2]):
  if a[0] > 0:
    a[0] = a[0]-1
  elif a[1] > 0:
    a[1] = a[1] -1
  elif a[0] <= 0 and a[1] <= 0:
    pass
 
b = []
b.append(str(a[0])
b.append(str(a[1])

Submission status: Runtime Error

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

for i in range(a[2]):
  if a[0] >= 0:
    a[0] = a[0]-1
  elif a[1] >= 0:
    a[1] = a[1] -1
  elif a[0] <= 0 and a[1] <= 0:
    pass
 
b = []
b.append(str(a[0])
b.append(str(a[1])

print(' '.join(b))

Submission status: Runtime Error

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

takahashi_cookie = A
aoki_cookie = B
iteration = K
     
while(0 < iteration):
    if(1 <= takahashi_cookie):
        takahashi_cookie -= 1
     
    elif(1 <= aoki_cookie):
        aoki_cookie -= 1
     
    else:
        pass
     
    iteration -= 1
     
    print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
     A,B,KT = map(str, input().spl
          it())

Submission status: Runtime Error

Solution code:
import argparse

def make_parser():
    parser = argparse.ArgumentParser()

    parser.add_argument('A', type=int)
    parser.add_argument('B', type=int)
    parser.add_argument('K', type=int)

    args = parser.parse_args()

    return args

def main():
    args = make_parser()

    takahashi_cookie = args.A
    aoki_cookie = args.B
    iteration = args.K

    while(0 < iteration):
        if(1 <= takahashi_cookie):
            takahashi_cookie -= 1

        elif(1 <= aoki_cookie):
            aoki_cookie -= 1

        else:
            pass

        iteration -= 1

    print(str(takahashi_cookie) + ' ' + str(aoki_cookie))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
taka, aoki, action = int(input().split())

for i in range(action):
  if taka > 0:
    taka -= 1
    continue
  
  elif aoki > 0:
    aoki -= 1
    continue
  
  else:
    break

print(taka, aoki)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(a b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if k >= a + b:
    a, b = 0, 0
else:
    for i in range(k):
        if a > 0:
            a -= 1
            continue   
        if a == 0 and b > 0:
            b -= 1
            continue
        break
print a, b

Submission status: Runtime Error

Solution code:
input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])

for i in range(k):
  if taka >= 1:
    taka -= 1
    continue
  elif aoki >= 1:
    aoki -= 1
    continue
  else:
    break

print(taka + ' ' + aoki)

Submission status: Runtime Error

Solution code:
ta, ao, K = map(int, input().split())
if K - ta > 0:
    taa = 0
    if ao - (K - ta) > 0:
        ao = ao - (K - ta)
    else:
        ao = 0
else:
    ta -= K


print(taa, ao)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        A,B,K = list(map(
            int, input().split()))
    else:
        pass

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



if __name__ =='__main__':
    main()

Submission status: Runtime Error

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

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


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

    
if A+B < K:
    print('0', '0')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

elif A + B < K:
  print('0', '0')

Submission status: Runtime Error

Solution code:
a, b, k = int(input().strip().split())
for i 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 = input().strip().split()
for i in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1
  else:
    break
print(a, b)

Submission status: Runtime Error

Solution code:
#[allow(unused_macros)]
macro_rules! input_byline {
    ($($r:tt)* ) => {
        let stdin = std::io::stdin();
        let mut q = std::collections::VecDeque::new();
        let mut next = || {
            if q.is_empty() {
                let mut s = String::new();
                stdin.read_line(&mut s);
                for v in s.split_whitespace() {
                    q.push_back(v.to_string());
                }
            }
            q.pop_front().unwrap()
        };
        input_inner!{next, $($r)*}
    };

}

#[allow(unused_macros)]
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

trait Printable {
    fn p(&self);
}

impl<T: std::fmt::Display> Printable for T {
    fn p(&self) {
        println!("{}", self);
    }
}

impl<T: std::fmt::Display> Printable for [T] {
    fn p(&self) {
        for i in 0..self.len() {
            if i != 0 {
                print!(" ");
            }
            print!("{}", self[i]);
        }
        println!("");
    }
}

#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{BinaryHeap, HashMap};

#[allow(dead_code)]
type Graph = Vec<Vec<usize>>;
#[allow(dead_code)]
const M: usize = 1e9 as usize + 9;

fn main() {
    input! {
        mut a: usize,
        mut b: usize,
        mut k: usize,
    }
    let sub = min(a, k);
    a -= sub;
    k -= sub;
    if k > 0 {
        let sub = min(b, k);
        b -= sub;
        k -= sub;
    }
    println!("{} {}", a, b);
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

def check(a,b,k):
    if a + b == k:
        b = 0
        a = 0
    elif a < k:
        b = b - (k-a)
        a = 0
    elif a > k:
        a = a - k
    return a,b

a,b,k=map(int,input().split(" "))
if len(str(a)) > 12 or len(str(b)) > 12 or len(str(k)) > 12:
  a=0
  b=0
  print(str(a),str(b))
  sys.exit()

else:
    if a > 0 and k > 0:
        A,B=check(a,b,k)
        print(str(A), str(B))
    elif a == 0 and b > k:
        b = b-k
        print(str(a), str(b))
    elif a+b < K:
        b = 0
        a = 0
        print(str(a), str(b))
    elif k ==0:
        print(str(a),str(b))

Submission status: Runtime Error

Solution code:
import sys

def check(a,b,k):
    if a + b == k:
        b = 0
        a = 0
    elif a < k:
        b = b - (k-a)
        a = 0
    elif a > k:
        a = a - k
    return a,b

a,b,k=map(int,input().split(" "))
if len(str(a)) > 12 or len(str(b)) > 12 or len(str(k)) > 12:
  a=0
  b=0
  print(str(a),str(b))
  sys.exit()

else:
    if a > 0 or k > 0:
        A,B=check(a,b,k)
    elif a <= 0 and b > 0:
        b = k -b
    print(str(A),str(B))

Submission status: Runtime Error

Solution code:
def getdata_input():
    while True:
        yield input()

def callFunc2(it):
    A0,B0,K=map(int, next(it).split())
    A=[0]
    B=[0]
    n=K//2

    A.append(min(n,A0))
    B.append(min(n,B0))

    n=K-(sum(A)+sum(B))
    
    if n>0:
        t=A0-sum(A)
        A.append(min(n, t))
        n=n-t
    if n > 0:
        t=B0-sum(B)
        B.append(min(n,t))
    return(f'{A0-sum(A)} {B0-sum(B)}')
  
it=getdata_input()
print(callFunc2(it))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, K = [int(x) for x in input().split()]
return max(0, A - k) + max(0, B - k)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Your code here!

input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]


for i in range(ABK[2]):

    if ABK[0] > 0:
        ABK[0] -= 1

    elif ABK[1] > 0: 
        ABK[1] -= 1

    else:
        pass
print(ABK[0]," ",ABK[1])

Submission status: Runtime Error

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


print(A,B)

Submission status: Runtime Error

Solution code:
abk = input_line.split(input()) 
ABK = [int(n) for n in abk]

while ABK[0] > 0:
    ABK[0] -= 1
    ABK[2] -= 1
    if ABK[2] < 1:
        break
else:
    pass
while ABK[1] > 0:
    ABK[1] -= 1
    ABK[2] -= 1
    if ABK[2] < 1:
        break
else:
    pass
#else:
print(ABK[0],ABK[1])

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
K = a[2]
A1 = A - K
if A1 < 0:
    B1 = A1 + B
    A1 = 0
    if B1 < 0:
        B1 = 0

print(A1,end=" ")
print(B1)

Submission status: Runtime Error

Solution code:
A = int(input("Enter Takahashi's cookie :"))
B = int(input("Enter Aoki's cookie:"))
K = int(input("The Action :"))
if A > 0 and B >0 and A+B > K:
    if A > K:
        A = A - K
        K = 0
        print(A,B)
    elif A < K :
        K = K - A
        A = 0
        print(K)
        B = B - K
        print(A,B)
    else :
        A = 0
        print (A,B)
elif A > 0 and B > 0 and A+B == K:
    A = B = 0
    print (A,B)
elif A == 0 and B == 0 :
    print("Nothing")
else :
    print ("Please try again")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- Coding: utf-8 -*-

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

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

exit(1)

Submission status: Runtime Error

Solution code:
ta_c,ao_c,num = map(int,input().split())

if num <= ta_c:
    print(ta_o-num,ao_c):
elif ta_c < num <= ta_c + ao_c:
    ao_c = ta_c+ao_c - num
    ta_c = 0
    print(ta_c,ao_c)
else;
    ta_c, ao_c = 0,0
    print(ta_c,ao_c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- Coding: utf-8 -*-

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

if a > 1000000000000 or b > 1000000000000 or k > 1000000000000:
    exit(1)

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

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

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

Submission status: Runtime Error

Solution code:
value = input()
list = value.split()
A = int(list[2] - list[0])
print(int(list[1]) - A)

Submission status: Runtime Error

Solution code:
# -*- Coding: utf-8 -*-

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

if k == 0:
    print('{0} {1}'.format(a,b))
    exit(1)

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

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

Submission status: Runtime Error

Solution code:
# coding: utf-8


def main():
    
    takahashi_cookie, aoki_cookie, action_count = map(int, input().split(' '))

    if action_count < takahashi_cookie:
        takahashi_result = takahashi_cookie - action_count
        aoki_result = aoki_result
        
    elif action_count <= (takahashi_cookie + aoki_cookie):
        takahashi_result = 0
        aoki_result = aoki_cookie - (action_count - takahashi_cookie)
        
    else:
        takahashi_result = 0
        aoki_result = 0
        
    print(takahashi_result, aoki_result)

    return 0
    

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
import resource
sys.setrecursionlimit(10 ** 12)


def main():
        
    a,b,c = map(int,input().split())
    
    if c >= a + b:
        print('0' + ' ' + '0')
    elif c <= a :
        a = a - c
        print(str(a) + ' ' + str(b))
    elif c <= b :
        b = b - (c - a)
        print('0' + ' ' + str(b))
    else:
        a = a - c
        b = b - (c - a)
        print(str(a) + ' ' + str(b))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

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

res = a - k

if res =< 0:
  a = 0
else:
  a = res

b += res
if b < 0:
  b = 0
  
print(str(a) + ' ' + str(b))

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
for i in range(c):
    if(a!=0):
        a-1
    b-1

Submission status: Runtime Error

Solution code:
s,k,t = input().split()
if s and k > 0:
  for i in range(t):
    if s > 0:
      	s = s - 1
    else 
    	k = k - 1 
  print(s, k)

Submission status: Runtime Error

Solution code:
A = int(input("Enter number of Takahashi's cookies: "))
B = int(input("Enter number of Aoki's cookies: "))
K = int(input("Enter number of cookie Takahashi eat: "))
for x in range(K):
  A = A-1
  K = K-1
  if A == 0:
    break
if A == 0 and K != 0:
  for x in range(K):
    B = B-1
    K = K-1
    if K==0:
      break
print(A)
print(B)

Submission status: Runtime Error

Solution code:
x=0
A,B,K = input().split()
while (int(A)>0):
  x=int(x)+1
  A=int(A)-1
  if(x>int(K)):
    break
while (int(B)>0):
  x=int(x)+1
  B=int(B)-1
  if(x>int(K)):
    break
if(A>0):
  A=int(A)+1
if(B>0):
  B=int(B)+1
print(format(A)+' '+format(B))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
for i in range(c):
    if(a!=0):
        a-1
    b-1

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
the_string = input()
a,b,c = the_string.split()
for i in range(c):
    while(a!=0):
        a-1
    b-1

Submission status: Runtime Error

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

for in 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())
if K<A:
    A_after=A-K
elif K>=A:
    A_after=0
    if K-A<B:
        B_after=B-(K-A)
    elif K-A>=B:
        B_after=0
print(A_after, B_after)

Submission status: Runtime Error

Solution code:
# coding: utf-8


def main():
    
    takahashi_cookie, aoki_cookie, action_count = map(int, input().split(' '))

    if action_count < takahashi_cookie:
        takahashi_result = takahashi_cookie - action_count
        aoki_result = aoki_result
    elif action_count <= (takahashi_cookie + aoki_cookie):
        takahashi_result = 0
        aoki_result = aoki_cookie - (action_count - takahashi_cookie)
    else:
        takahashi_result = 0
        aoki_result = 0
        
    print(takahashi_result, aoki_result)

    return 0
    

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
In = input().split(" ")
T = int(In[0])
A = int(In[1])
K = int(In[2])
 
if K>=T+A:
  print("0 0")
else:
	if (K > T):
  		print("0 {0}".format(A-(K-T)))
	elif (T > K):
  		print("{0} {1}".format(T-K, A))
	else:
  		for i in range(K):
    		if T >= 1:
     			 T -= 1
    		else:
    			if A >= 1:
      				A -= 1
    			else:
      				break
  		print("{0} {1}".format(T, A))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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