Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
h = [int(i) for i in input().split()]

memo = [float("inf")] * N
memo[0], memo[1] = 0, abs(h[1] - h[0])


def frog(ith):
    if memo[ith] != float("inf"):
        return memo[ith]
    memo[ith] = min(
        frog(ith - 1) + abs(h[ith] - h[ith - 1]),
        frog(ith - 2) + abs(h[ith] - h[ith - 2]),
    )
    return memo[ith]


print(frog(N - 1))


Fixed submission:
N = int(input())
h = [int(i) for i in input().split()]
dp = []
for i in range(N):
    if i == 0:
        dp.append(0)
        continue
    if i == 1:
        dp.append(abs(h[1] - h[0]))
        continue
    dp.append(min(dp[i - 1] + abs(h[i] - h[i - 1]), dp[i - 2] + abs(h[i] - h[i - 2])))
print(dp[-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
h = [int(i) for i in input().split()]
dp = [-1] * N
dp[0] = 0
for i_from in range(N - 1):
    for j_to in range(1, min(K + 1, N - i_from)):
        if dp[i_from + j_to] == -1:
            dp[i_from + j_to] = dp[i_from] + abs(h[i_from + j_to] - h[i_from])
        else:
            dp[i_from + j_to] = min(
                dp[i_from + j_to], dp[i_from] + abs(h[i_from + j_to] - h[i_from])
            )
print(dp[-1])


Fixed submission:
N, K = map(int, input().split())
h = [int(i) for i in input().split()]
dp = [-1] * N
dp[0] = 0
for i_from in range(N - 1):
    for j_to in range(1, min(K + 1, N - i_from)):
        if dp[i_from + j_to] == -1:
            dp[i_from + j_to] = dp[i_from] + abs(h[i_from + j_to] - h[i_from])
        else:
            dp[i_from + j_to] = min(
                dp[i_from + j_to], dp[i_from] + abs(h[i_from + j_to] - h[i_from])
            )
print(dp[-1])
Buggy python submission (verdict: Runtime Error):
N, P = map(int, input().split())
P_prime = []
while P % 2 == 0:
    P_prime.append(2)
    P //= 2
odd = 3
while odd * odd <= P:
    if P % odd == 0:
        P_prime.append(odd)
        P //= odd
    else:
        odd += 2
if P != 1:
    P_prime.append(P)
edge = [0]
for i in range(len(P_prime) - 1):
    if P_prime[i] != P_prime[i + 1]:
        edge.append(i)
edge.append(len(P_prime) - 1)
ans = 1
for i in range(len(edge) - 1):
    ans *= pow(P_prime[edge[i + 1]], (edge[i + 1] - edge[i]) // N)
print(ans)


Fixed submission:
import collections as cl

N, P = map(int, input().split())
if P == 1:
    print(1)
    exit()
P_prime = []
while P % 2 == 0:
    P_prime.append(2)
    P //= 2
odd = 3
while odd * odd <= P:
    if P % odd == 0:
        P_prime.append(odd)
        P //= odd
    else:
        odd += 2
if P != 1:
    P_prime.append(P)

ans = 1
dic_P = cl.Counter(P_prime)
for prime, num in dic_P.items():
    ans *= pow(prime, num // N)
print(ans)
Buggy python submission (verdict: Runtime Error):
X = int(input())
if X == 7 or X == 5 or X == 3:
    print("YES")
else"
    print("NO")


Fixed submission:
X = int(input())
if X == 7 or X == 5 or X == 3:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import itertools as it


def is_753(n):
    dic753 = {}
    for i in str(n):
        if i == "7":
            dic753[7] = True
        elif i == "5":
            dic753[5] = True
        elif i == "3":
            dic753[3] = True
        else:
            return False
    if len(dic753) >= 3:
        return True
    else:
        return False


N = int(input())
dig = 3
candidate = []
dig = 3
while True:
    for i in it.product([3, 5, 7], repeat=dig):
        a = int("".join(map(str, i)))
        if a > N:
            break
        else:
            candidate.append(a)
    dig += 1
for i in candidate:
    if is_753(i):
        ans += 1
print(ans)


Fixed submission:
import itertools as it

N = input()
list_753 = []
for i in range(3, len(N) + 1):
    for i_753 in it.product("357", repeat=i):
        if "3" in i_753 and "5" in i_753 and "7" in i_753:
            list_753.append(int("".join(i_753)))

ans = 0
for i in list_753:
    if i <= int(N):
        ans += 1
    else:
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(N):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")


Fixed submission:
S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(len(S)):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
A = [A[i] - i - 1 for i in range(N)]
A.sort()
# for a in [A[N // 2], A[N // 2 + 1]]:
sum_A = [0, 0]
for i in range(N):
    sum_A[0] += abs(A[i] - A[N // 2])
sum_2 = 0
for i in range(N):
    sum_A[1] += abs(A[i] - A[N // 2 + 1])
print(min(sum_A))


Fixed submission:
N = int(input())
if N == 1:
    print(0)
    exit()
A = [int(i) for i in input().split()]
A = [A[i] - i - 1 for i in range(N)]
A.sort()
if N == 2:
    print(abs(A[0] - A[1]))
    exit()

sum_A = [0, 0]
for i in range(N):
    sum_A[0] += abs(A[i] - A[N // 2])
sum_2 = 0
for i in range(N):
    sum_A[1] += abs(A[i] - A[N // 2 + 1])
print(min(sum_A))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
A = [int(i) for i in input().split()]
A = np.array([A[i] - i - 1 for i in range(N)])
ans = 0
for i in range(N):
    if i == 0:
        ans = np.sum(np.abs(A - np.ones(N) * A[i]))
    else:
        ans = min(ans, np.sum(np.abs(A - np.ones(N) * A[i])))
print(int(ans))


Fixed submission:
N = int(input())
if N == 1:
    print(0)
    exit()
A = [int(i) for i in input().split()]
A = [A[i] - i - 1 for i in range(N)]
A.sort()
if N == 2:
    print(abs(A[0] - A[1]))
    exit()

sum_A = [0, 0]
for i in range(N):
    sum_A[0] += abs(A[i] - A[N // 2])
sum_2 = 0
for i in range(N):
    sum_A[1] += abs(A[i] - A[N // 2 + 1])
print(min(sum_A))
Buggy python submission (verdict: Runtime Error):
N = input()
if int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:
    print("Yes")
else:
    print("No")


Fixed submission:
N = input()
if int(N) % sum([int(N[i]) for i in range(len(N))]) == 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(N):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")


Fixed submission:
N = input()
if int(N) % sum([int(N[i]) for i in range(len(N))]) == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A, B = list(map(int, input().split()))
print(max(A + B, max(A - B.A * B)))


Fixed submission:
A, B = list(map(int, input().split()))
print(max(A + B, max(A - B, A * B)))
Buggy python submission (verdict: Runtime Error):
S = input().split()
if S[0] != S[1] != S[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
if sorted(input()) == ["a", "b", "c"]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
ABCD = []
for i in range(4):
    ticket = int(input())
    hodai = int(input())
    ABCD.append(min(ticket, hodai))

print(sum(ABCD))


Fixed submission:
ABCD = []
for i in range(2):
    ticket = int(input())
    hodai = int(input())
    ABCD.append(min(ticket, hodai))

print(sum(ABCD))
Buggy python submission (verdict: Runtime Error):
import sys

N, Y = list(map(int, input().split()))
for i_yukichi in range(N + 1):
    for j_higuchi in range(N + 1 - i_yukichi):
        k_noguchi = N - i_yukichi - j_higuchi
        if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
            print(i_yukichi, j_higuchi, k_noguchi)
            sys.exit()

print("-1 -1 -1")


Fixed submission:
S = input()
for i in range(len(S)):
    if i == 3:
        print("8", end="")
    else:
        print(S[i], end="")

Buggy python submission (verdict: Runtime Error):
import sys

N, Y = list(map(int, input().split()))
for i_yukichi in range(N + 1):
    for j_higuchi in range(N + 1 - i_yukichi):
        k_noguchi = N - i_yukichi - j_higuchi
        if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
            print(i_yukichi, j_higuchi, k_noguchi)
            sys.exit

print("-1 -1 -1")


Fixed submission:
S = input()
for i in range(len(S)):
    if i == 3:
        print("8", end="")
    else:
        print(S[i], end="")
Buggy python submission (verdict: Runtime Error):
N, Y = list(map(int, input().split()))
ans = []
for i_yukichi in range(N + 1):
    for j_higuchi in range(N + 1 - i_yukichi):
        k_noguchi = N - i_yukichi - j_higuchi
        if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
            ans.append(i_yukichi)
            ans.append(j_higuchi)
            ans.append(k_noguchi)
            break
if len(ans) != 0:
    print(ans[0], ans[1], ans[3])
else:
    print("-1 -1 -1")


Fixed submission:
N, Y = list(map(int, input().split()))
ans = []
for i_yukichi in range(N + 1):
    for j_higuchi in range(N + 1 - i_yukichi):
        k_noguchi = N - i_yukichi - j_higuchi
        if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
            ans.append(i_yukichi)
            ans.append(j_higuchi)
            ans.append(k_noguchi)
            break
if len(ans) != 0:
    print(ans[0], ans[1], ans[2])
else:
    print("-1 -1 -1")
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
S = input()
pos_hyphen = [i if S[i] == "-" for i in range(len(S))]
if len(pos_hyphen) == 1 and pos_hyphen[0] == A:
    print("Yes")
else:
    print("No")


Fixed submission:
A, B = map(int, input().split())
S = input()
pos_hyphen = [i for i in range(len(S)) if S[i] == "-"]
if len(pos_hyphen) == 1 and pos_hyphen[0] == A:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
S = input()
if S.index("-") == A:
    print("Yes")
else:
    print("No")


Fixed submission:
A, B = map(int, input().split())
S = input()
pos_hyphen = [i for i in range(len(S)) if S[i] == "-"]
if len(pos_hyphen) == 1 and pos_hyphen[0] == A:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S = input()
for i in range(len(S) - 1):
    if S[i, i + 1] == "AC":
        print("Yes")
        exit()
print("No")


Fixed submission:
S = input()
for i in range(len(S) - 1):
    if S[i: i + 2] == "AC":
        print("Yes")
        exit()
print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = {}
for i in range(N):
    a = int(input())
    if a in A:
        A[a] += 1
    else:
        A[a] = 1
ans = 0
for val in A.values:
    ans += val % 2
print(ans)


Fixed submission:
N = int(input())
A = {}
for i in range(N):
    a = int(input())
    if a in A:
        A[a] += 1
    else:
        A[a] = 1
ans = 0
for val in A.values():
    ans += val % 2
print(ans)
Buggy python submission (verdict: Runtime Error):
import math as m
N = int(input())
F_ab = 0
for i in range(1, int(sqrt(N))+1):
    if N%i != 0:
        continue
    if i == 1:
        F_ab = len(str(N//i))
    else:
        F_ab = min(F_ab, max(len(str(i)), len(str(N//i))))

print(F_ab)

Fixed submission:
import math as m
N = int(input())
F_ab = 0
for i in range(1, int(m.sqrt(N))+1):
    if N%i != 0:
        continue
    if i == 1:
        F_ab = len(str(N//i))
    else:
        F_ab = min(F_ab, max(len(str(i)), len(str(N//i))))

print(F_ab)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")


Fixed submission:
a, b = input().split()
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")
Buggy python submission (verdict: Runtime Error):
x, y = list(map(int, input().split()))
if y - x >= 0:
    ans = y - x
if y + x >= 0:
    ans = min(ans, y + x + 1)
if -1 * y - x >= 0:
    ans = min(ans, -1 * y - x + 1)
if -1 * y + x >= 0:
    ans = min(ans, -1 * y + x + 2)
print(ans)


Fixed submission:
x, y = list(map(int, input().split()))
ans = []
if y - x >= 0:
    ans.append(y - x)
if y + x >= 0:
    ans.append(y + x + 1)
if -1 * y - x >= 0:
    ans.append(-1 * y - x + 1)
if -1 * y + x >= 0:
    ans.append(-1 * y + x + 2)
print(min(ans))

Buggy python submission (verdict: Runtime Error):
x, y = list(map(int, input().split()))
if y - x >= 0:
    ans = y - x
if y + x >= 0:
    ans = min(ans, y + x + 1)
if -y - x >= 0:
    ans = min(ans, -y - x + 1)
if -y + x >= 0:
    ans = min(ans, -y + x + 2)
print(ans)


Fixed submission:
x, y = list(map(int, input().split()))
ans = []
if y - x >= 0:
    ans.append(y - x)
if y + x >= 0:
    ans.append(y + x + 1)
if -1 * y - x >= 0:
    ans.append(-1 * y - x + 1)
if -1 * y + x >= 0:
    ans.append(-1 * y + x + 2)
print(min(ans))
Buggy python submission (verdict: Runtime Error):
equa = input().split()
if equa[1] == "+":
    print(int(equa[0]) + int(equa[1]))
else:
    print(int(equa[0]) - int(equa[1]))


Fixed submission:
equa = input().split()
if equa[1] == "+":
    print(int(equa[0]) + int(equa[2]))
else:
    print(int(equa[0]) - int(equa[2]))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if sum(abc)//2 == a or sum(abc)//2 == b or sum(abc)//2 == c:
    print("Yes")
else:
    print("No")


Fixed submission:
a, b, c = map(int, input().split())
if a + b + c == 2 * max(a, max(b, c)):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
        continue
    if len(i) == 0:
        continue
    elif len(i) != 0:
        ans.pop()
print(*ans, sep="")


Fixed submission:
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
        continue
    if len(ans) == 0:
        continue
    elif len(ans) != 0:
        ans.pop()
print(*ans, sep="")

Buggy python submission (verdict: Runtime Error):
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
    else:
        ans.pop()
print(*ans, sep="")


Fixed submission:
s = input()
ans = []
for i in s:
    if i != "B":
        ans.append(i)
        continue
    if len(ans) == 0:
        continue
    elif len(ans) != 0:
        ans.pop()
print(*ans, sep="")
Buggy python submission (verdict: Runtime Error):
ABC = [int(i) fo i  in input())
ABC.sort()
if sum(ABC) == 17 and ABC[0] == 5 and ABC[2] == 7:
    print("YES")
else:
    print("NO")


Fixed submission:
ABC = [int(i) for i in input().split()]
ABC.sort()
if sum(ABC) == 17 and ABC[0] == 5 and ABC[2] == 7:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
"""
"""
A, B, C, K = map(int, input().split())
sum = 0
for i in range(K):
    if A >= 1:
        sum += 1
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        sum -= 1

print(sum)


Fixed submission:
"""
"""
A, B, C, K = map(int, input().split())
sum = 0

if A >= 1:
    if K - A >= 0:
        sum += A
        K -= A
    else:
        sum += K
        K = 0
if B >= 1 and K >= 1:
    if K - B >= 0:
        K -= B
    else:
        K = 0

if C >= 1 and K >= 1:
    if K - C >= 0:
        sum -= C
        K -= C
    else:
        sum -= K
        K = 0

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=input().split()

same = 0

for i in A:
    for j in A:
        if i==j:
            same += 1

if same == N:
    print('YES')
elif same > N:
    print('NO')


Fixed submission:
N=int(input())
A=input().split()
not_same=1
A.sort()

for i in range(len(A)-1):
    if A[i]==A[i+1]:
        print('NO')
        break
    else:
        not_same += 1

if not_same == N:
    print('YES')
Buggy python submission (verdict: Runtime Error):
a = input()
a + a ** 2 + a ** 3 = A
print(A)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
a + a **2 + a ** 3 = A
print(A)


Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
	print(a + a ** 2 + a ** 3)


Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
a + a * 2 + a * 3 = Z
 print(Z)


Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
 print(a + a * 2 + a * 3)


Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
a = input()
 print(a + a * 2 + a * 3 = Z)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 print(a + a * 2 + a * 3)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 print("a + a * 2 + a * 3")

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 print(a + a * 2 + a * 3 = Z)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 
a + a * 2 + a * 3 = Z
	print("Z")

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 
a * 2 + a * 3 + a * 4 = Z
	print("Z")

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)
 
a ** 2 + a ** 3 + a ** 4 = Z
	print("Z")

Fixed submission:
a = int(input())
print(a + a**2 + a**3)

Buggy python submission (verdict: Runtime Error):
input(a)

a**2 + a**3 + a**4 = Z
print("Z")

Fixed submission:
a = int(input())
print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
        exit(0)       
print('No')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
        exit(0)
else:        
print('No')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz'
		print('Yes')
        exit(0)
        
print('No')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz'
		print('Yes')
        exit(0)
else:        
print('No')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz'
		print('Yes')
        exit(0)
        
print('No')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz'
		print('Yes')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

if s = t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz'
		print('Yes')

Fixed submission:
s = input()
t = input()
     
if s == t[:len(s)]:
	if t[-1] in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
		exit(0)       

print('No')
Buggy python submission (verdict: Runtime Error):
import math

input_from = input()
info = input_from.split(' ')
a = int(info[0])

def is_prime(n):
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for num in range(3, int(math.sqrt(n)), 2):
        if n % num == 0:
            return False
    return True

if a == 2:
    print(2)
else:
    while not is_prime(a):
        a += 1

print("{0}".format(a))


Fixed submission:
input_from = input()
strings = input_from.split(' ')
print("{0}{1}".format(strings[1], strings[0]))

Buggy python submission (verdict: Runtime Error):
input_from = input()
strings = input_from.split(' ')
print(f'{strings[1]}{strings[0]}')

Fixed submission:
input_from = input()
strings = input_from.split(' ')
print("{0}{1}".format(strings[1], strings[0]))
Buggy python submission (verdict: Time Limit Exceeded):
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
for i in range(k):
    if a > 0:
        a -= 1
    elif b > 0:
        b -= 1
print("{0} {1}".format(a, b))

Fixed submission:
input_from = input()
info = input_from.split(' ')
a = int(info[0])
b = int(info[1])
k = int(info[2])
a -= k
if a < 0:
    b += a
    a = 0
    if b < 0:
        b = 0
print("{0} {1}".format(a, b))
Buggy python submission (verdict: Runtime Error):
import math
 
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
 
def count_combinations(min_val, max_val):
    path_len = max_val - min_val - 2
    if path_len < 2:
        return 1
    twos = path_len // 2
    min_amount = twos + (path_len % 2)
    count = 0
    for i in range(min_amount, path_len + 1):
        count += comb(i, twos)
        twos -= 1
    return count
 
def conut_paths(a):
    paths = 1
    for i in range(len(a) - 1):
        paths *= count_combinations(a[i], a[i + 1])
    return paths % 1000000007
 
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]
A.sort()
 
for i in range(1, M):
    if A[i - 1] + 1 == A[i]:
        print(0)
        exit()
 
A.insert(0, -1)
A.append(N + 1)
print(conut_paths(A))

Fixed submission:
times = list(map(int, input().split()))
times.sort()
print(times[0] + times[1])