Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(len(p_list)):
  p_list[i] += 1
  p_list[i] /= 2

ans = 0
for i in range(N-K+1):
  if ans < sum(p_list[i:i+K]):
    ans = sum(p_list[i:i+K])

print(ans)

Fixed submission:
N, K = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(len(p_list)):
  p_list[i] += 1
  p_list[i] /= 2

sum_p = sum(p_list[0:K])
ans = sum_p
for i in range(1, N-K+1):
  sum_p = sum_p - p_list[i-1] + p_list[i+K-1]
  if ans < sum_p:
    ans = sum_p

print(ans)
Buggy python submission (verdict: Runtime Error):
import Queue as Q

N, M = map(int, input().split())

if N > M:
  print('No')
else:
  print('Yes')

Fixed submission:
N, M = map(int, input().split())

if N > M:
  print('No')
else:
  print('Yes')

Buggy python submission (verdict: Runtime Error):
from dataclasses import dataclass, field
from typing import Any

N, M = map(int, input().split())

if N > M:
  print('No')
else:
  print('Yes')

Fixed submission:
N, M = map(int, input().split())

if N > M:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))

class Node:
  def __init__(self, data):
    self.left = None
    self.right = None
    self.data = data

  def insert(self, data):
    if self.data:
      if data < self.data:
        if self.left is None:
          self.left = Node(data)
        else:
          self.left.insert(data)
      elif data > self.data:
        if self.right is None:
          self.right = Node(data)
        else:
          self.right.insert(data)
    else:
      self.data = data

  def PrintTree(self):
    if self.left:
      return self.left.PrintTree() + 1
    else:
      return 1

root = Node(P[0])
for i in range(1, len(P)):
  root.insert(P[i])

print(root.PrintTree())

Fixed submission:
N = int(input())
P = list(map(int, input().split()))

cnt = 1
min_p = P[0]
for i in range(1, len(P)):
  if P[i] < min_p:
    cnt += 1
    min_p = P[i]

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))

cnt = 0
for i in range(len(P)):
  cnt += 1
  for j in range(i):
    if P[i] > P[j]:
      cnt -= 1
      break

print(cnt)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))

cnt = 1
min_p = P[0]
for i in range(1, len(P)):
  if P[i] < min_p:
    cnt += 1
    min_p = P[i]

print(cnt)
Buggy python submission (verdict: Runtime Error):
x = int(input())




# 素数を求める
pn = []
for xi in range(2, x+1):
  flag = 1
  for pi in pn:
    if xi%pi==0:
      flag = 0
  if flag == 1:
    pn.append(xi)

#print(pn)

# inputをカウントアップしながら、素数で割れるか確認
while True:
  x += 1
  flag = 1
  for pi in pn:
    if x%pi==0:
      flag = 0
      break
  if flag == 1:
    break

print(x)

Fixed submission:
word1, word2 = input().split()
print(word2+word1)

Buggy python submission (verdict: Runtime Error):
a, b, k = input().split()
a, b, k = int(a), int(b), int(k)

if k < a:
  a = a-k

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

Fixed submission:
word1, word2 = input().split()
print(word2+word1)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = input().split()
a, b, k = int(a), int(b), int(k)

for ki in range(k):
  if a >= 1:
    a -= 1
  elif b >= 1:
    b -= 1

print(a,b)

Fixed submission:
a, b, k = input().split()
a, b, k = int(a), int(b), int(k)

if k < a:
  a = a-k

else:
  k = k-a
  a = 0
  if k < b:
    b = b-k
  else:
    b = 0
  
print(a,b)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A, B))

Fixed submission:
A, B = map(int, input().split())

def hcfnaive(x, y): 
  if(y == 0): 
    return x 
  else: 
    return hcfnaive(y, x % y)

def lcm(x, y):
    return (x * y) // hcfnaive(x, y)

print(lcm(A, B))
Buggy python submission (verdict: Runtime Error):
n, r = map(int,input().split())
if n < 10:
  return r
else:
  return 100 * (10 - n)


Fixed submission:
def main():
  n, r = map(int,input().split())
  if n > 9:
    print(r)
  else:
    print(r + 100 * (10 - n))

main()

Buggy python submission (verdict: Runtime Error):
n, r = input()
if n < 10:
  return r
else:
  return 100 * (10 - n)


Fixed submission:
def main():
  n, r = map(int,input().split())
  if n > 9:
    print(r)
  else:
    print(r + 100 * (10 - n))

main()

Buggy python submission (verdict: Runtime Error):
n, r = map(int, input().split())
if n < 10:
  return r
else:
  return 100 * (10 - n)


Fixed submission:
def main():
  n, r = map(int,input().split())
  if n > 9:
    print(r)
  else:
    print(r + 100 * (10 - n))

main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a_list = list(map(int, input().split()))
check = 0
for i in range(len(a_list)):
    val = a_list[i]
    if a_list.count(val) > 1:
        check = 1
        
if check == 0:
    print("YES")
else:
    print("NO")

Fixed submission:
N = int(input())
a_list = list(map(int, input().split()))
a_list.sort()
check = 0
for i in range(N-1):
    if a_list[i] == a_list[i+1]:
        check = 1
        break
        
if check == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())
count = 0

while count < K:
    if A != 0:
        A -= 1
    elif B != 0:
        B -= 1
    else:
        pass
    count += 1
print(str(A)+" "+str(B))

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

if A >= K:
    print(str(A-K)+" "+str(B))
elif A+B <= K:
    print(str(0)+" "+str(0))
else:
    print(str(0)+" "+str(A+B-K))
Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
ans = int((A*B)/math.gcd(A,B))
print(ans)

Fixed submission:
import fractions
A, B = map(int, input().split())
ans = int((A*B)/fractions.gcd(A,B))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
S= list(S)
switch = 0  
for i in range(len(S)):
    S[i] = int(S[i])
S_change = S
result = 0
count = 1
while len(S_change) >= 2 and count != 0:   
    S_list = S_change
    S_change = []
    count = 0
    switch = 0
    # print(S_list)
    for i in range(len(S_list)):
        if switch == 1:
            switch = 0
        elif i == len(S_list)-1:
            S_change.append(S_list[i])
        elif S_list[i] != S_list[i+1]:
            result = result +2
            count = count + 1
            switch = 1        
        else:
            S_change.append(S_list[i])
    # print(S_change)
print(result)

Fixed submission:
S = str(input())
S= list(S)
switch = 0  
for i in range(len(S)):
    S[i] = int(S[i])
count_0 = 0
count_1 = 0
for i in range(len(S)):
    if S[i] == 0:
        count_0 = count_0 + 1
    else:
        count_1 = count_1 + 1
        
if count_0 > count_1:
    count = count_1
else:
    count = count_0
    
result = 2 * count
print(result)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
ans = 0
while True:
    ans = ans + 1
    N = N / K
    if N < K:
        print(ans + 1)
        return

Fixed submission:
N, K = map(int, input().split())
ans = 0
while True:
    if N < K:
        print(ans + 1)
        break
    ans = ans + 1
    N = N / K

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
ans = 0
while True:
    ans = ans + 1
    N = N / K
    if N < K:
        print(ans + 1)
        return

Fixed submission:
N, K = map(int, input().split())
ans = 0
while True:
    if N < K:
        print(ans + 1)
        break
    ans = ans + 1
    N = N / K
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    N = int(input())
    A = [int(input()) for i in range(N)]

    mx = max(A)
    for i in range(N):
        s = A[i]
        if mx != s:
            print(mx)
        else:
            print(sorted(A)[-2])
            
resolve()

Fixed submission:
def resolve():
    N = int(input())
    A = [int(input()) for i in range(N)]

    mx = max(A)
    sec = sorted(A)[-2]
    for i in range(N):
        s = A[i]
        if mx != s:
            print(mx)
        else:
            print(sec)

resolve()
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
    import numpy as np
    N = int(input())
    D = sorted(list(map(int, input().split())))
    d = np.array(D)
    idx = len(D) // 2
    ans = 0
    for i in range(d[idx - 1], d[idx]+1):
        if len(d[d < i]) == len(d[d >= i]):
            ans += 1
    print(ans)

resolve()

Fixed submission:
def resolve():
    N = int(input())
    D = sorted(list(map(int, input().split())))
    idx = len(D) // 2
    mid = D[idx]
    low = D[idx - 1]
    if mid == low:
        print(0)
        return

    print(mid - low)

resolve()
Buggy python submission (verdict: Runtime Error):
s = set(int(input()))
print("Good" if len(s) == 4 else "Bad")

Fixed submission:
def resolve():
    s = list(input())
    prev = '-1'
    for i in s:
        if i == prev:
            print("Bad")
            return
        prev = i
    print("Good")

resolve()

Buggy python submission (verdict: Runtime Error):
def resolve():
    s = set(int(input()))
    print("Good" if len(s) == 4 else "Bad")
    
resolve()

Fixed submission:
def resolve():
    s = list(input())
    prev = '-1'
    for i in s:
        if i == prev:
            print("Bad")
            return
        prev = i
    print("Good")

resolve()
Buggy python submission (verdict: Runtime Error):
def lcm(a, b):
    import math
    return a // math.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))

Fixed submission:
def lcm(a, b):
    import fractions 
    return a // fractions.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))

Buggy python submission (verdict: Runtime Error):
def lcm(a, b):
    import math
    return a // math.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))

Fixed submission:
def lcm(a, b):
    import fractions 
    return a // fractions.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))

Buggy python submission (verdict: Runtime Error):
def lcm(a, b):
    import math
    return a // math.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

def resolve():
    A, B, C, D = map(int, input().split())

    ans = f(B, C, D) - f(A-1, C, D)
    print(int(ans))

resolve()

Fixed submission:
def lcm(a, b):
    import fractions 
    return a // fractions.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))

Buggy python submission (verdict: Runtime Error):
def lcm(a, b):
    import math
    return a // math.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

def resolve():
    A, B, C, D = map(int, input().split())

    ans = f(B, C, D) - f(A-1, C, D)
    print(int(ans))

resolve()

Fixed submission:
def lcm(a, b):
    import fractions 
    return a // fractions.gcd(a, b) * b


def f(x, c, d):
    res = x
    res -= x//c
    res -= x//d
    res += x//lcm(c,d)
    return res

A, B, C, D = map(int, input().split())

ans = f(B, C, D) - f(A-1, C, D)
print(int(ans))
Buggy python submission (verdict: Runtime Error):
def resolve():
    import numpy as np
    N = int(input())
    A = np.array([list(map(int, input().split())) for __ in range(N)])
    l = A[np.argsort(A[:, 1])]

    t = 0
    for i in l:
        t += i[0]
        if t > i[1]:
            print('No')
            return
    print('Yes')

resolve()

Fixed submission:
def resolve():
    import numpy as np
    N = int(input())
    A = np.array([list(map(int, input().split())) for __ in range(N)])
    l = A[np.argsort(A[:, 1])]

    t = 0
    for i in l:
        t += i[0]
        if t > i[1]:
            print('No')
            return
    print('Yes')

resolve()
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input.split()))
alice, bob = 0, 0

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)



Fixed submission:
N = int(input())
A = list(map(int, input().split()))
alice, bob = 0, 0

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int, input.split())
alice, bob = 0, 0

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)



Fixed submission:
N = int(input())
A = list(map(int, input().split()))
alice, bob = 0, 0

for i in range(N):
    m = max(A)
    A.remove(m)
    if i % 2 == 0:
        alice += m
    else:
        bob += m
print(alice - bob)
Buggy python submission (verdict: Runtime Error):
N = int(input())
# t, x, y = 0, 0, 0
for __ in range(N):
    t, x, y = map(int, input().split())
    if (x + y) > t or (x + y + t) % 2 != 0:
        print("No")
        sys.exit()

print("Yes")

Fixed submission:
t, x, y = 0, 0, 0
for i in range(int(input())):
    next_t, next_x, next_y = map(int, input().split())
    diff = abs(x - next_x) + abs(y - next_y)
    if diff > (next_t - t) or (diff - (next_t - t)) % 2 == 1:
        print("No")
        exit(0)
    t, x, y, = next_t, next_x, next_y
print("Yes")

Buggy python submission (verdict: Runtime Error):
    N = int(input())
    # t, x, y = 0, 0, 0
    for __ in range(N):
        t, x, y = map(int, input().split())
        if (x + y) > t or (x + y + t) % 2 != 0:
            print("No")
            sys.exit()

    print("Yes")

Fixed submission:
t, x, y = 0, 0, 0
for i in range(int(input())):
    next_t, next_x, next_y = map(int, input().split())
    diff = abs(x - next_x) + abs(y - next_y)
    if diff > (next_t - t) or (diff - (next_t - t)) % 2 == 1:
        print("No")
        exit(0)
    t, x, y, = next_t, next_x, next_y
print("Yes")

Buggy python submission (verdict: Runtime Error):
N = int(input())
t, x, y = 0, 0, 0

for _ in range(N):
    next_t, next_x, next_y = [int(__) for __ in input().split()]

    delta_t = next_t - t
    distance = abs(next_x - x) + abs(next_y - y)

    if distance > delta_t:
        print("No")
        sys.exit()

    if (delta_t - distance) % 2 != 0:
        print("No")
        sys.exit()

    t, x, y = next_t, next_x, next_y

print("Yes")

Fixed submission:
t, x, y = 0, 0, 0
for i in range(int(input())):
    next_t, next_x, next_y = map(int, input().split())
    diff = abs(x - next_x) + abs(y - next_y)
    if diff > (next_t - t) or (diff - (next_t - t)) % 2 == 1:
        print("No")
        exit(0)
    t, x, y, = next_t, next_x, next_y
print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A, B = map(int, input().split())

ans = 0
for i in range(N + 1):
    if A <= sum(map(int, list(str(i)))) <= B:
        ans += i
print(ans)

Fixed submission:
N, A, B = map(int, input().split())

ans = 0
for i in range(N + 1):
    if A <= sum(list(map(int, list(str(i))))) <= B:
        map(int, list(str(i)))
        ans += i
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(input, input().split())

ans = 0
for i in range(N + 1):
    if A <= sum(map(int, list(str(i)))) <= B:
        ans += 1
print(ans)


Fixed submission:
N, A, B = map(int, input().split())

ans = 0
for i in range(N + 1):
    if A <= sum(list(map(int, list(str(i))))) <= B:
        map(int, list(str(i)))
        ans += i
print(ans)

Buggy python submission (verdict: Runtime Error):
N, A, B = map(input, [input() for i in range(3)])

ans = 0
for i in range(N + 1):
    if A <= sum(map(int, list(str(i)))) <= B:
        ans += 1
print(ans)


Fixed submission:
N, A, B = map(int, input().split())

ans = 0
for i in range(N + 1):
    if A <= sum(list(map(int, list(str(i))))) <= B:
        map(int, list(str(i)))
        ans += i
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
count = 0
for s in S:
    s += 1 if s == 1 else 0
print count
     

Fixed submission:
s = input()
print(s.count("1"))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

count = 0
while all(i%2 == 0 for i in A):
    A /= 2
    count += 1
print(count)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
A = list(map(int, input().split()))

count = 0
while all(i%2 == 0 for i in A ):
    N = [i/2 for i in A]
    count += 1
print(count)

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))

count = 0
while all(i%2 == 0 for i in N ):
    N = [i/2 for i in N]
    count += 1
print(count)


Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))

count = 0
for i in all(i%2 == 0 for i in N ):
    N = [i/2 for i in N]
    count += 1
print(count)



Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split(' ')))
bit = 0
for a in A:
    bit |= a
print(len(bit) - len(bit.rstrip('0')))

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input.split(' ')))
bit = 0
for a in A:
    bit |= a
print(len(bit) - len(bit.rstrip('0')))

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N = input()
A = map(int, input.split(' '))    
bit = 0
for a in A:
    bit |= a
print(len(bit) - len(bit.rstrip('0')))

Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n, r = map(lambda x: int(x), input().split())
if n < 10:
  print(100*(10-n)+r)
  return
print(r)

Fixed submission:
n, r = map(lambda x: int(x), input().split())
if n < 10:
  print(100*(10-n)+r)
else:
  print(r)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().split()))
p = []

for i in range(100):
   	cnt = 0
	for j in range(n):
   		cnt = cnt + (x[j]-i)**2
    	p.append(cnt)

print(sorted(p)[0])

Fixed submission:

if __name__ == '__main__':
    n = int(input())
    x = list(map(int, input().split()))
    p = []

    for i in range(100):
        cnt = 0
        for j in range(n):
            cnt = cnt + (x[j]-i)**2
        p.append(cnt)

    print(sorted(p)[0])
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())


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


ans = []
for x in range(len(A)):
    for y in range(x+1, len(A)):
        ans.append(A[x]*A[y])
ans.sort()
print(ans[K-1])



Fixed submission:
import numpy as np
N, K = map(int, input().split())

A = np.array(list(map(int, input().split())))
A.sort()

pos = A[A > 0]
neg = A[A < 0]
zero = A[A == 0]

l = -10**18
r = 10**18

while l + 1 < r:
    x = (l+r) // 2
    cnt = 0
    if x >= 0:
        cnt += N * len(zero)

    cnt += A.searchsorted(x//pos, side="right").sum()
    cnt += (N - A.searchsorted(-(-x//neg), side="left")).sum()
    cnt -= np.count_nonzero(A * A <= x)
    cnt //= 2

    if cnt >= K:
        r = x
    else:
        l = x

print(r)
Buggy python submission (verdict: Time Limit Exceeded):
Q=input()
S="B"+input()+"B"
Q_num = Q.split(" ")[1]
query = []
for q in range(int(Q_num)):
  qu = input().split(" ")
  print(len(S[int(qu[0]):(int(qu[1])+1)].split("AC"))-1)

Fixed submission:
Q=input()
S=input()
N,Q_num = int(Q.split(" ")[0]),int(Q.split(" ")[1])
AC=[0]
count = 0
for i in range(N-1):
  if S[i]=="A" and S[i+1]=="C":
    count = 1+count
  AC.append(count)
for q in range(int(Q_num)):
  qu = input().split(" ")
  print(AC[int(qu[1])-1]-AC[int(qu[0])-1])

Buggy python submission (verdict: Time Limit Exceeded):
Q=input()
S="B"+input()+"B"
Q_num = Q.split(" ")[1]
query = []
for q in range(int(Q_num)):
  query.append(input().split(" "))
  
#下のforを上に統合可
for q in query:
  print(len(S[int(q[0]):(int(q[1])+1)].split("AC"))-1)


Fixed submission:
Q=input()
S=input()
N,Q_num = int(Q.split(" ")[0]),int(Q.split(" ")[1])
AC=[0]
count = 0
for i in range(N-1):
  if S[i]=="A" and S[i+1]=="C":
    count = 1+count
  AC.append(count)
for q in range(int(Q_num)):
  qu = input().split(" ")
  print(AC[int(qu[1])-1]-AC[int(qu[0])-1])
Buggy python submission (verdict: Runtime Error):
N = list(map(int, input().split()))

print("ABC") if N < 1000 else print("ABD")

Fixed submission:
N = list(map(int, input().split()))

print("ABC") if N[0] < 1000 else print("ABD")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if （a * b） % 2 == 0:
  print('Even')
else:
  print('Odd')

Fixed submission:
print(input().count('1'))
Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
b = b/10000
m = 1
five = 0.5
t = 0.1
select = []
for i in range(a+1):
  for j in range(a+1):
    for k in range(a+1):
      if i+j+k == a and (m*i + five*j +t*k) == b:
        select.append(i)
        select.append(j)
        select.append(k)
        break
    else:
      continue
    break
  else:
    continue
  break

if len(select) == 0:
  print(-1,-1,-1)
else:
  print(select[0],select[1],select[2])
        
    

Fixed submission:
a, b = map(int, input().split())
count = 0
for i in range(a+1):
  for j in range(a+1-i):
    s = (10000*i) + (5000*j) + (1000*(a-i-j))
    if s == b:
      print(i,j,(a-i-j))
      count += 1
      break
  else:
    continue
  break
  
if count == 0:
  print(-1,-1,-1)