Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02812 (python)

Fixed submission:
n = int(input())
s = str(input())
count = 0
if n % 3 == 1 or n % 3 == 0:
  for i in range(n-1):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
      count += 1
elif n % 3 == 2:
  for i in range(n-2):
    if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
count = 0
if n % 3 != 0 and n >= 3:
  for i in range (1,n):  
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
elif n % 3 == 0 and n >= 3:
  for i in range(1, n-1):
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
if n == 2:
  print(0)
else:
  print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
count = 0
if n % 3 != 0:
  for i in range (1,n):  
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
elif n % 3 == 0:
  for i in range(1, n-1):
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input())
count = 0
for i in range (1,n):
  if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
    count += 1
print(count)
Problem p02817 (python)

Fixed submission:
a, b = map(str, input().split())
print(b + a)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(b + a)
Problem p02909 (python)

Fixed submission:
S = input()
if S == "Sunny":
  print("Cloudy")
elif S == "Cloudy":
  print("Rainy")
else:
  print("Sunny")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "Sunny":
  print("Cloudy")
if S = "Cloudy":
  print("Rainy")
else:
  print("Sunny")
Problem p02921 (python)

Fixed submission:
days = list(str(input()))
days_real = list(str(input()))
count = 0
for i in range(3):
  if days[i] == days_real[i]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
days = list(str(input()))
days_real = list(str(input()))
for i in range(3):
  if days[i] == days_real[i]:
    count += 1
print(count)
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split())
if (a + b) % 2 == 0 :
  print ((a + b) // 2)
else :
  print ("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a + b) % 2 == 0 :
  print ((a + b) / 2)
else :
  print ("IMPOSSIBLE)
Problem p02958 (python)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
answer = 0
for i in range(n):
  if p[i]  != (i + 1):
  	answer += 1
  
if answer <= 2:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))
answer = 0
for i in range(n):
  if p[i] + 1 != p[i + 1]:
  	answer += 1
  if answer <= 2:
    print('Yes')
  else:
    print('No')
Problem p02969 (python)

Fixed submission:
radius = int(input())
print (3 * radius * radius)

Buggy submission (verdict: Runtime Error):
print (3 * input() * input())
Problem p02981 (python)

Fixed submission:
inp = list(map(int, input().split()))
if (inp[0] * inp[1]) <= inp[2] : 
	print (inp[0] * inp[1])
else :
    print (inp[2])

Buggy submission (verdict: Runtime Error):
inp = list(map(int, input().split()))
if (inp[0] * inp[1]) <= ip[2] : 
	print (inp[0] * inp[1])
else :
    print (inp[2])
Problem p02993 (python)

Fixed submission:
inp = list(input())
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print("Good")
else :
  print("Bad")

Buggy submission (verdict: Runtime Error):
inp = input()
inp = list(inp)
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Buggy submission (verdict: Runtime Error):

inp = list(input())
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Buggy submission (verdict: Runtime Error):
inp = map(int, input().split())
inp = list(inp)
hard = 0
for number in range(0, 2) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Buggy submission (verdict: Runtime Error):
inp = map(int, input().split())
inp = list(inp)
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Buggy submission (verdict: Runtime Error):
inp = map(int, input().split())
inp = inp.list()
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    print ("Bad")
    hard = 1
    
if hard == 0 :
  print ("Good")
Problem p02999 (python)

Fixed submission:
a, b = map(int, input().split())
if a < b :
  print (0)
else:
  print (10)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a[0] < b[1] :
  print (0)
else:
  print (10)

Buggy submission (verdict: Runtime Error):
inp = map(int, input().split())
if inp[0] < inp[1] :
  print (0)
else:
  print (10)

Buggy submission (verdict: Runtime Error):
inp = map(int, input().split())
if (inp[0] < inp[1]) :
  print 0
else:
  print 10
Problem p03035 (python)

Fixed submission:
a,b = map(int, input().split(" "))
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split(" "))
if a => 13 :
  print(b)
elif a >= 6 and a <= 12 :
  print(b/2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split(" "))
if a => 13 :
  print(b)
elif 6 <= a >= 12 :
  print(b/2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split(" "))
if a => 13 :
  print(b)
elif 6 <= a => 12 :
  print(b/2)
else:
  print(0)
Problem p03296 (python)

Fixed submission:
from numpy import random
n = int(input())
a = list(map(int, input().split()))
b = 0
for i in range (len(a) - 1) :
  if a[i] == a[i + 1]:
    b += 1
    a[i + 1] = random.randint(10000)
print(b)

Buggy submission (verdict: Runtime Error):
n = int(input())
arr = list(map(int, input().split()))
from numpy import random
b = 0
for i in range (len(a) - 1) :
  if a[i] == a[i + 1]:
    b += 1
    a[i + 1] = random.randint(10000)
print(b)
Problem p03463 (python)

Fixed submission:
n, a, b = map(int, input().split())
if (a - b) % 2 == 0:
  print("Alice")
else:
  print("Borys")

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
if (n + b) % 2 == 0:
  print("Alice")
elif (n + b) % 2 != 0:
  print("Bor
Problem p03951 (python)

Fixed submission:
n = int(input())
s = input()
t = input()
answer = n
for i in range (n + 1) :
  newstring = s[0:i] + t[:n]
  if newstring[0:n] == s:
    answer += i
    break
print (answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
t = input()
answer = n
for i in range (n + 1) :
  if answer == n :
    newstring = s[0:i] + t[:n]
  	if newstring[0:n] == s :
    	answer += i
print (answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
t = input()
answer = n
for i in range (n + 1) :
  if answer == n :
  	newstring = s[0:i] + t[:n]
  	if newstring[0:n] == s :
    	answer += i
print (answer)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
s1 = []
t1 = []
for i in range(0 , n):
  s1.append(s[i])
for i in range(0 , n):
  t1.append(t[i])
a = set(s1 + t1)
print(len(a))
Problem p04033 (python)

Fixed submission:
a, b = map(int, input().split())
if a > 0 :
  print("Positive")
elif b < 0 :
  if (b - a) % 2 == 0 :
      print("Negative")
  else:
      print("Positive")
else:
   print("Zero")

Buggy submission (verdict: Runtime Error):
a, b = map(int(input().split())
if a > 0:
  print("Positive")
elif a < 0 :
  if (b - a) % 2 == 0 :
      print("Positive")
  else:
      print("Negative")
else:
   print("Zero")
Problem p02600 (python)

Fixed submission:
kyu = [400,600,800,1000,1200,1400,1600,1800,2000]

x = int(input())

for i, v in enumerate(kyu):
    if x < v:
        print(9-i)
        break

Buggy submission (verdict: Runtime Error):
import numpy as np

n, k = map(int, input().split())
ai = list(map(int, input().split()))

ei = []

for i in range(k,n+1):
    ei.append(np.prod(ai[i-k:i]))


for i in range(n-k):
    if ei[i] < ei[i+1]:
        print("Yes")
    else:
        print("No")
Problem p02663 (python)

Fixed submission:
h1, m1, h2, m2, k = map(int,input().split())
 
h=h2 - h1
if h < 0:
    h = 24+h
    m=m2 - m1
    du=h*60+m-k
elif h == 0:
    if m1 < m2:
        du = m2-m1-k
    else:
        du = 24*60 +(m2-m1)-k
else:
    du = h*60+(m2-m1)-k
        
print(du)

Buggy submission (verdict: Runtime Error):
h1, m1, h2, m2, k = map(int,input().split())
 
h=h2 - h1
if h < 0:
    h = 24+h
    m=m2 - m1
    du=h*60+m-k
elif h == 0:
    if m1 < m2:
        du = m2-m1-k
else:
    du = h*60+m-k
        
print(du)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
A , B =map9int,input().split())
print(A*B)
Problem p02748 (python)

Fixed submission:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

A, B, M = map(int, input().split())
List_A = list(map(int, input().split()))
List_B = list(map(int, input().split()))
List_discount = [list(map(int, input().split())) for i in range(M)]

# print(List_discount)
ans = 2 * 10**5
for d in List_discount:
    # print(d)
    p = List_A[d[0]-1] + List_B[d[1]-1] - d[2]
    ans = min(ans, p)
no_discount = min(List_A) + min(List_B)
ans = min(ans, no_discount)
print(ans)

Buggy submission (verdict: Runtime Error):
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

A, B, M = map(int, input().split())
List_A = list(map(int, input().split()))
List_B = list(map(int, input().split()))
List_discount = [list(map(int, input().split())) for i in range(M)]

# print(List_discount)
ans = 2 * 10**5
for d in List_discount:
    # print(d)
    p = List_A[d[0]-1] + List_B[d[0]-1] - d[2]
    ans = min(ans, p)
no_discount = min(List_A) + min(List_B)
ans = min(ans, no_discount)
print(ans)
Problem p02765 (python)

Fixed submission:
N, R = map(int,input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(10-N))

Buggy submission (verdict: Runtime Error):
N, R = map(int,input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(10-K))
Problem p02786 (python)

Fixed submission:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

MP = int(input())
M = 1
ans = 0

while MP > 1:
    ans += M
    M = 2*M
    MP = MP//2
ans += M

print(ans)

Buggy submission (verdict: Runtime Error):
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
import itertools
import math
input = sys.stdin.readline

N = int(input())
list_P = tuple(map(int, input().split()))
list_Q = tuple(map(int, input().split()))

List_All = list(itertools.permutations(list(range(1, N+1))))
# print(List_All)
Pi = List_All.index(list_P)
Qi = List_All.index(list_Q)
print(abs(Pi-Qi))
Problem p02817 (python)

Fixed submission:
S, T = input().split()
print(T+S)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
print(S+T)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
print(S+T)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
print(S+T)
Problem p02993 (python)

Fixed submission:
S = list(input())
for i in range(1,4):
  if S[i] == S[i-1]:
    print("Bad")
    exit()
print("Good")

Buggy submission (verdict: Runtime Error):
S = list(input())
for i in range(1,4):
  if S[i] == S[i-1]:
    print("Bad")
	break
print("Good")
Problem p03030 (python)

Fixed submission:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

N = int(input())
L = []
for i in range(N):
    c, p = input().split()
    p = int(p)
    L.append([i+1, c, p])
L = sorted(L, key=lambda x: (x[1], -x[2]))
for i in range(N):
    print(L[i][0])

Buggy submission (verdict: Runtime Error):
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

N = int(input())
L = []
for i in range(N):
    c, p = input().split()
    p = int(p)
    L.append([i+1, c, p])
L = sorted(L, lambda x: (x[1], -x[2]))
for i in range(N):
    print(L[i][0])
Problem p03071 (python)

Fixed submission:
A, B = map(int,input().split())
ans = 0
for i in range(2):
  ans += max(A,B)
  if max(A,B) == A:
    A -= 1
  else:
    B -= 1
print(ans)

Buggy submission (verdict: Runtime Error):
A, B = map(int,input().split())
ans = 0
for i in range(2):
  ans += max(A,B)
  if max(A) == A:
    A -= 1
  else:
    B -= 1
print(ans)
Problem p03085 (python)

Fixed submission:
S = input()
ans = ""
if S == "A":
  ans = "T"
elif S == "T":
  ans = "A"
elif S == "C":
  ans = "G"
elif S == "G":
  ans = "C"

print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
ans = ""
if S == "A":
  ans = "T"
elif S == "T":
  ans = "A"
elif S == "C":
  ans = "G"
else S == "G":
  ans = "C"

print(ans)
Problem p03145 (python)

Fixed submission:
S = list(map(int,input().split()))
S.sort()
print((S[0]*S[1])//2)

Buggy submission (verdict: Runtime Error):
S = list(map(int,inpuy().split()))
S.sort()
print((S[0]+S[1])/2)
Problem p03385 (python)

Fixed submission:
s = input()
a = set(s)
if len(a) == 3:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
a = set(a)
if len(a) == 3:
  print("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
S = list(input())
S[3] = '8'
a = ''.join(S)
print(a)

Buggy submission (verdict: Runtime Error):
S = input()
S[3] = '8'
print(S)
Problem p03477 (python)

Fixed submission:
A, B, C, D = map(int,input().split())
if A+B > C+D:
  print("Left")
elif A+B == C+D:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int,input().split())
if A+B > C+D:
  print("Left")
elif A+B = C+D:
  print("Balanced")
else:
  print("Right")
Problem p03501 (python)

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

Buggy submission (verdict: Runtime Error):
N, A, B = map(int,input().split())
print(min(N*A, B)
Problem p03543 (python)

Fixed submission:
N = input()
if len(set(N[1:])) == 1 or len(set(N[:3])) == 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if len(set(N[1:]) == 1 or len(set(N[:3])) == 1:
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if len(set(N[1:]) == 1 and len(set(N[:3])) == 1:
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
if len(set(N[1:]) == 1 and len(set(N[:3])):
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
S = input()
N = 0
for i in range(1,len(S))
  if S[i-1] == S[i]:
    N += 1
if N >= 2:
  print("Yes")
else:
  print("No")
Problem p03547 (python)

Fixed submission:
A, B = map(lambda S: int(S,16), input().split())
if A < B:
  print("<")
elif A == B:
  print("=")
else:
  print(">")

Buggy submission (verdict: Runtime Error):
A, B = map(lambda S: int(S,16), input().split())
if A < B:
  print("<")
elif A = B:
  print("=")
else:
  print(">")

Buggy submission (verdict: Runtime Error):
A, B = map(lambda S: int(s,16), input().split())
if A < B:
  print("<")
elif A = B:
  print("=")
else:
  print(">")
Problem p03555 (python)

Fixed submission:
C = []
C.append(input())
C.append(input())
 
if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
C = []
C.append(list(map(int,input().split())))
C.append(list(map(int,input().split())))

if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
  print("YES")
else:
  print("NO")
Problem p03573 (python)

Fixed submission:
A = list(map(int,input().split()))
B = list(set(A))
if A.count(B[0]) == 1:
  print(B[0])
else:
  print(B[1])

Buggy submission (verdict: Runtime Error):
A = list(map(int,input().split()))
B = set(A)
if A.count(B[0]) == 1:
  print(B[0])
else:
  print(B[1])
Problem p03657 (python)

Fixed submission:
A = list(map(int, input().split()))
A.append(sum(A))

ans = False
for i in A:
  if i%3 == 0:
    ans = True
if ans:
  print("Possible")
else:
  print("Impossible")

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

ans = False
for i in A:
  if A%3 == 0:
    ans = True
if ans:
  print("Possible")
else:
  print("Impossible")
Problem p03729 (python)

Fixed submission:
A, B, C = input().split()
 
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
A, B, C = input().split()

if A(len(A)-1) == B[0] and B(len(B)-1) == C[0]:
  print("YES")
else:
  print("NO")
Problem p03773 (python)

Fixed submission:
import itertools
A, B = map(int,input().split())
print((A+B)%24)

Buggy submission (verdict: Runtime Error):
import itertools
A, B = map(int,input().split())

print(itertools.cycle(range(24))[A+B])
Problem p03962 (python)

Fixed submission:
A = list(map(int,input().split()))
B = set(A)
print(len(B))

Buggy submission (verdict: Runtime Error):
A = list(map(int,input().split()))
B = map(A)
print(len(B))
Problem p02600 (python)

Fixed submission:
x = int(input())
left_score = x - 400

print(8 - left_score // 200)

Buggy submission (verdict: Runtime Error):
n, k = list(map(int, input().split(" ")))

a_lst = list(map(int, input().split(" ")))

# previousの値を取っておいて真に掛け算した評定が高かったかを判定
previous = 1
for i in range(k):
    previous *= a_lst[i]
for i in range(k, n):
    now = previous / a_lst[i - k] * a_lst[i]
    if now > previous:
        print("Yes")
    else:
        print("No")
    previous = now
Problem p02612 (python)

Fixed submission:
n = int(input())

if(n % 1000 == 0):
	print(0)
else:
	print(1000 - n % 1000)

Buggy submission (verdict: Runtime Error):
n,k = list(map(int, input().split(" ")))
a_lst = list(map(int,input().split(" ")))


plus_lst = list(filter(lambda num: num >= 0 , a_lst))
minus_lst = list(filter(lambda num: num < 0 , a_lst))
plus_lst.sort(reverse=True)
minus_lst.sort(reverse=True)


# +,-どちらもk以上ある
	# max(abs+,abs-)で大きい方をk-1回目までとる, k-1回目で+だったら+, -だったら-
# +: kない, -: kある
	# +の数が残り1になるまでabsでやる,最後に+を使って調整する
# +: kある, -: kない
	# -の数が1になるまでabsでやる, 最後に-を使って調整
# +: kない, -: kない
	# どちらかが残り1になるまでやる,最後に調整
# -のみ
	# absでできるだけ小さいものを使う

# 0を抜いたらk個なかった場合、絶対どっかで0を掛けるので0
# 全部-の場合
if(len(plus_lst) == 0):
	total = 1
	for i in range(k):
		total *=minus_lst[i]
	print(total % (10**9 + 7))
elif(len(minus_lst) == 0):
	total = 1
	for i in range(k):
		total *= plus_lst[i]
	print(total % (10**9 + 7))
else:
	total = 1
	for i in range(k):
		if(i == k - 1):
			if(total > 0):
				total *= plus_lst.pop(0)
			else:
				total *= minus_lst.pop(-1)
		else:
			# plus残り1の場合
			if(len(plus_lst) == 1):
				total *= minus_lst.pop(-1)
			# minus残り1の場合
			elif(len(minus_lst) == 1):
				total += plus_lst.pop(0)					
			# +-どっちも十分あった場合
			else:
				plus_max = plus_lst[0]
				minus_max = minus_lst[0]
				if(abs(plus_max) > abs(minus_max)):
					plus_lst.pop(0)
					total *= plus_max
				else:
					minus_lst.pop(-1)
					total *= minus_max
	print(total % (10**9 + 7))
Problem p03292 (python)

Fixed submission:
a1,a2,a3 = map(int,input().split(" "))


a12 = abs(a1 - a2)
a13 = abs(a1 - a3)
a23 = abs(a2 - a3)

max_num = max(a12,a13, a23)

print(a12 + a13 + a23 - max_num)

Buggy submission (verdict: Runtime Error):
a1,a2,a3 = input().split(" ")

a12 = abs(a1 - a2)
a13 = abs(a1 - a3)
a23 = abs(a2 - a3)

min_num = min(a12,a13, a23)

print(sum(a12,a13,a23) - min_num)
Problem p02600 (python)

Fixed submission:
i = int(input())
if 400 <= i < 600:
    print(8)
elif 600 <= i < 800:
    print(7)
elif 800 <= i < 1000:
    print(6)
elif 1000 <= i < 1200:
    print(5)
elif 1200 <= i < 1400:
    print(4)
elif 1400 <= i < 1600:
    print(3)
elif 1600 <= i < 1800:
    print(2)
elif 1800 <= i <= 1999:
    print(1)

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

for i in range(k-1):
  if b < a:
    b = b * 2
  elif c < b:
    c = c * 2
  else:
    pass

if (a < b) & (b < c):
    print('Yes')
else:
    print('No')
Problem p02993 (python)

Fixed submission:
output = []
 
for (i, x) in enumerate(input()):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
        pre = x
            
if len(output) > 0:
    print(output)
else:
    output = "Good"
    print(output)

Buggy submission (verdict: Runtime Error):
output = []
 
for (i, x) in enumerate(S):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
        pre = x
            
if len(output) > 0:
    print(output)
else:
    output = "Good"
    print(output)

Buggy submission (verdict: Runtime Error):
output = []
 
for (i, x) in enumerate(S):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
        pre = x
            
if len(output) > 0:
    print(output)
else:
    output = "Good"
    print(output)

Buggy submission (verdict: Runtime Error):
output = []
 
for (i, x) in enumerate(S):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
            print(output)
        pre = x
            
if len(output) > 0:
    print(output)
else:
    output = "Good"
    print(output)

Buggy submission (verdict: Runtime Error):
output = []

for (i, x) in enumerate(S):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
        pre = x
            
if output == "Bad":
    print(output)
else:
    output == "Good"
    print(output)

Buggy submission (verdict: Runtime Error):
message = []

for (i, x) in enumerate(S):
    if i == 0:
        pre = 0
        pre = x
    else:
        if pre == x:
            message = "Bad"
        pre = x
            
if message == "Bad":
    print(message)
else:
    print("Good")