Buggy python submission (verdict: Time Limit Exceeded):

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

Fixed submission:

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



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)

Buggy python submission (verdict: Runtime Error):
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])





Fixed submission:

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



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# 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
        ABK[2] -= 1
        if ABK[2]==0:
            break
    elif ABK[1] > 0: 
        ABK[1] -= 1
        ABK[2] -= 1
        if ABK[2]==0:
            break
    else:
        pass

print(ABK[0]," ",ABK[1])




Fixed submission:

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



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)

Buggy python submission (verdict: Time Limit Exceeded):
input_line = input()
abk = input_line.split(" ") 
ABK = [int(n) for n in abk]

while ABK[0] > 0 and ABK[2] >= 1:
    ABK[0] -= 1
    ABK[2] -= 1
else:
    pass
while ABK[1] > 0 and ABK[2] >= 1:
    ABK[1] -= 1
    ABK[2] -= 1
else:
    pass

print(ABK[0]," ",ABK[1])
    

Fixed submission:

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



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)

Buggy python submission (verdict: Runtime Error):
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])
    

Fixed submission:

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



if ABK[0] + ABK[1] <= ABK[2]:
    A = 0
    B = 0

elif ABK[0] <= ABK[2] and ABK[1] > ABK[2] - ABK[0]:
    A = 0
    B = ABK[1] -  (ABK[2] - ABK[0])

elif ABK[0] > ABK[2]:
    A = ABK[0] - ABK[2]
    B = ABK[1]

    
print(A," ",B)