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

Fixed submission:
N,L = map(int,input().split())
S=[]
for i in range(N):
  S.append(input())
S.sort()
ans="".join(S)
print(ans)

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

for i in range(N):
  S.append(input())
S.sort()
ans="".join(S)
print(ans)

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
S = []
for i in range(N):
  S.append(list(input()))

S.sort()
print(sum(S))
Problem p03219 (python)

Fixed submission:
x, y = map(int,input().split())
answer = x + y//2
print(answer)

Buggy submission (verdict: Runtime Error):
n = int(input())
t, a = map(int,input().split())
li = list(map(int,input().split()))
n_temp = 2147483647
answer = 2147483647
for idx, temp in enumerate(li):
    i_temp = int(t - temp * 0.006)
    if (abs(a - n_temp) > abs(a -i_temp)):
        n_temp = i_temp
        answer = idx

print(answer+1)
Problem p03076 (python)

Fixed submission:
lst = []
for i in range(5):
    lst.append(int(input()))
lst.sort(reverse=True, key = lambda x : (x - 1) % 10)
s = 0
for i in range(5):
    s += lst[i]
    if s % 10 != 0 and i != 4:
        s += 10 - s % 10

print(s)

Buggy submission (verdict: Runtime Error):
lst = []
for i in range(5):
  lst.append(int(input())
lst.sort(reverse=True, key = lambda x : (x - 1) % 10)
s = 0
for i in lst:
    s += i
    if i != lst[4]:
        s += 10 - s % 10

print(s)

Buggy submission (verdict: Runtime Error):
lst = [int(x) for x in input().split()]
lst.sort(reverse=True, key = lambda x : (x - 1) % 10)
s = 0
for i in lst:
    s += i
    if i != lst[4]:
        s += 10 - s % 10

print(s)
Problem p02952 (python)

Fixed submission:
n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
 
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1, N + 1):
    if lens(str(i)) % 2 is 1:
      ans += 1
      
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
ans = 0
for i in range(1, N + 1):
    if lens(str(i)) % 2 is 1:
      ans += 1
      
print(ans)
Problem p03292 (python)

Fixed submission:
*a,=map(int,input().split())
print(max(a)-min(a))

Buggy submission (verdict: Runtime Error):
*a=map(int,input().split())
print(max(a)-max(b))
Problem p02953 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
if N > 1:
    A[0] -= 1
    for i in range(N-1):
        if A[i]<A[i+1]:
            A[i+1] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 1:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
if N > 1:
    A[i] -= 1
    for i in range(1,N-1):
        if A[i]<A[i+1]:
            A[i+1] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 1:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
if N > 1:
    for i in range(N-1):
        if A[i]>=A[i+1] && A[i] != 1:
            A[i] -= 1
    for i in range(N-1):
        if A[i] > A[i+1]:
            print("No")
            break
    else:
        print("Yes")
elif N == 1:
    print("Yes")
Problem p03071 (python)

Fixed submission:
a, b = map(int, input().split(" "))
print(max(2*a-1, a+b, 2*b-1))

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

a, b = map(int, input().split(" "))
print(np.max(2*a-1, a+b, 2*b-1))
Problem p02993 (python)

Fixed submission:
a,b,c,d = [int(s) for s in input()]
print('Bad') if a == b or b == c or c == d else print('Good')

Buggy submission (verdict: Runtime Error):
def check_key(S, key_length):
    for i,k in enumerate(S):
        if k == S[i+1]:
            return 'Bad'
        if i == key_length - 1:
            return 'Good'
        else:
            continue
S = input()
key_length = len(S)
print(check_key(S, key_length))

Buggy submission (verdict: Runtime Error):
def check_key(S, key_length):
    for i,k in enumerate(S):
        if k == S[i+1]:
            return 'Bad'
        if i == key_length - 1:
            return 'Good'
        else:
            continue
S = input()
key_length = len(S)
print(check_key(S, key_length))

Buggy submission (verdict: Runtime Error):
def check_key(S, key_length):
    for i,k in enumerate(S):
        if k == S[i+1]:
            return 'bad'
        if i == key_length - 1:
            return 'Good'
        else:
            continue
S = input()
key_length = len(S)
print(check_key(S, key_length))
Problem p02957 (python)

Fixed submission:
i1 = input().split(' ')
a=int(i1[0])
b=int(i1[1])

aa = abs(a)+abs(b)
if aa%2 == 0:
  print(int(aa/2))
  exit()

print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
i1 = int(input())
i2 = input().split(' ')
i3 = input().split(' ')

w = -1
s = 0

for i in range(i1):
  ii2 = int(i2[i])
  ii3 = int(i3[i])
#  print(ii2)
#  print(ii3)

  if ii2 > ii3:
    #引ききれた場合
    s += ii3
  else:
    s += ii2
    w = ii3 - ii2

    iii2 = int(i2[i+1])

    if iii2 > w:
      s += w
      w = iii2 - w
    else:
      s += iii2
      w = 0

print(s)

Buggy submission (verdict: Runtime Error):
i1 = int(input())
i2 = input().split(' ')
i3 = input().split(' ')

w = -1
s = 0

for i in range(i1):
  ii2 = int(i2[i])
  ii3 = int(i3[i])
#  print(ii2)
#  print(ii3)

  if ii2 > ii3:
    #引ききれた場合
    s += ii3
  else:
    s += ii2
    w = ii3 - ii2

    iii2 = int(i2[i+1])

    if iii2 > w:
      s += w
      w = iii2 - w
    else:
      s += iii2
      w = 0

print(s)
Problem p03477 (python)

Fixed submission:
i1 = input().split(' ')
a=int(i1[0])+int(i1[1])
b=int(i1[2])+int(i1[3])

if a>b:
  print("Left")
elif a==b:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
i1 = input().split(' ')
a=int(i1[0])+int(i1[1])
b=int(i1[2])+int(i1[3])

if a>b:
  print("Left")
elif a=b:
  print("Balanced")
else:
  print("Right")
Problem p02952 (python)

Fixed submission:
def main():
    N = input()
    i = 0
    while int(N) >0:
        if len(N) % 2 != 0:
            i+=1
        N = int(N) -1
        N = str(N)
    print(i)
main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    i = 0
    while N >0:
        if len(N) % 2 != 0:
            i+=1
        N -= 1
    print(i)
main()
Problem p03087 (python)

Fixed submission:
import re

def solve1():
    N, Q = map(int, input().split())
    # print(N, Q)
    acgt_string = input()
    sub_str_ith = []
    for _ in range(Q):
        start, end = map(int, input().split())
        sub_str_ith.append((start, end))

    t = [0] * (N+1)
    for i in range(N):
        t[i+1] = t[i] + (1 if acgt_string[i:i+2] == "AC" else 0)

    for start, end in sub_str_ith:
        print(t[end-1] - t[start-1])

def my_solve1():
    N, Q = map(int, input().split())
    # print(N, Q)
    acgt_string = input()
    sub_str_ith = []
    for _ in range(Q):
        start, end = map(int, input().split())
        sub_str_ith.append((start, end))
    # print(sub_str_ith)

    # 全ての'A'の位置を取得
    a_iths = [m.span() for m in re.finditer('AC', acgt_string)]
    # print(a_iths)

    for start, end in sub_str_ith:
        # print(start, end)
        num = 0
        for ac_start, ac_end in a_iths:
            if ac_start >= start-1 and ac_end <= end:
                num += 1
        print(num)


solve1()
# my_solve1()

Buggy submission (verdict: Runtime Error):
import re

def solve1():
    N, Q = map(int, input().split())
    # print(N, Q)
    acgt_string = input()
    sub_str_ith = []
    for _ in range(Q):
        start, end = map(int, input().split())
        sub_str_ith.append((start, end))

    t = [0] * (N)
    for i in range(N):
        t[i+1] = t[i] + (1 if acgt_string[i:i+2] == "AC" else 0)

    for start, end in sub_str_ith:
        print(t[end-1] - t[start-1])

def my_solve1():
    N, Q = map(int, input().split())
    # print(N, Q)
    acgt_string = input()
    sub_str_ith = []
    for _ in range(Q):
        start, end = map(int, input().split())
        sub_str_ith.append((start, end))
    # print(sub_str_ith)

    # 全ての'A'の位置を取得
    a_iths = [m.span() for m in re.finditer('AC', acgt_string)]
    # print(a_iths)

    for start, end in sub_str_ith:
        # print(start, end)
        num = 0
        for ac_start, ac_end in a_iths:
            if ac_start >= start-1 and ac_end <= end:
                num += 1
        print(num)


solve1()
# my_solve1()
Problem p03244 (python)

Fixed submission:
import collections

n = int(input())
v = [int(i) for i in input().split()]
odd = collections.Counter(v[1::2])
even = collections.Counter(v[0::2])
# print(odd)

max_odd = max(odd, key=odd.get)
# print(max_odd)
max_even = max(even, key=even.get)
# print(max_even)

max_odd_v = odd[max_odd]
max_even_v = even[max_even]

if max_odd == max_even:
    if len(odd) > 1:
        max_2nd_odd = odd.most_common(2)[1][0]
        max_2nd_odd_v = odd[max_2nd_odd]
    else:
        max_2nd_odd_v = 0
    if len(even) > 1:
        max_2nd_even = even.most_common(2)[1][0]
        max_2nd_even_v = even[max_2nd_even]
    else:
        max_2nd_even_v = 0
    if (max_odd_v + max_2nd_even_v) < (max_even_v + max_2nd_odd_v):
        print(n - (max_even_v + max_2nd_odd_v))
    else:
        print(n - (max_odd_v + max_2nd_even_v))
else:
    print(n - (max_odd_v + max_even_v))

Buggy submission (verdict: Runtime Error):
import collections

n = int(input())
v = [int(i) for i in input().split()]
odd = collections.Counter(v[1::2])
even = collections.Counter(v[0::2])
# print(odd)

max_odd = max(odd, key=odd.get)
# print(max_odd)
max_even = max(even, key=even.get)
# print(max_even)

if max_odd == max_even:
    del(even[max_even])
    try:
        max_even = max(even, key=even.get)
        max_even_v = even[max_even]
    except:
        max_even_v = 0
    
max_odd_v = odd[max_odd]
num_change_odd = n / 2 - max_odd_v
num_change_even = n / 2 - max_even_v
print(int(num_change_odd + num_change_even))
Problem p03262 (python)

Fixed submission:
import fractions

n, x = map(int, input().split())

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

dist_list = []
for city in city_list:
    dist_list.append(abs(city - x))

max_common_value = dist_list.pop(0)

for dist in dist_list:
    # 今までのDと次の都市の距離との最大公約数を見つける
    max_common_value = fractions.gcd(max_common_value, dist)

print(max_common_value)

Buggy submission (verdict: Runtime Error):
# コンテスト時にトライしていたアルゴリズム
# その後の検証でアルゴリズムは正しそうなのでコードエラーを探す

n, x = map(int, input().split())
city_list = list(map(int, input().split()))
 
import numpy as np
 
def getNearestValue(list, num):
    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return list[idx]

nearest_city = getNearestValue(city_list, x)
# Dとなり最大値はXと最も近い都市との距離に等しい
max_D = abs(nearest_city-x)

# TLE対策 都市との距離は事前に計算
dist_list = []
for city in city:
    dist_list.append(abs(city - x))


for xx in reversed(range(1, max_D+1)):
    flag = True
    for dist in dist_list:
        if (dist % xx) != 0:
            flag = False
            break
    if flag:
        break
print(xx)
Problem p02983 (python)

Fixed submission:
import itertools
L,R = map(int,input().split())
if (L+2019) < R:
  R = L+2019

ans_list=[]
for v in itertools.combinations(range(L,R+1),2):
  buf1 = v[0]%2019
  buf2 = v[1]%2019
  ans_list.append((buf1*buf2)%2019)
print(min(ans_list))

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

ans_list=[]
for v in itertools.combinations(range(L,R+1),2):
  buf1 = v[0]%2019
  buf2 = v[1]%2019
  ans_list.append((buf1*buf2)%2019)
print(min(ans_list))

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

ans_list=[]
for v in itertools.combinations(range(L,R+1),2):
  ans_list.append((v[0]*v[1])%2019)
print(min(ans_list))
Problem p03001 (python)

Fixed submission:
W, H, x, y = map(int,input().split())
buf_x = W-x
buf_y = H-y
if buf_x >= x:
  ver_area = H*x
else:
  ver_area = H*buf_x
if buf_y >= y:
  hori_area = W*y
else:
  hori_area = W*buf_y

if x*2 == W and y*2 ==H:
  print(float(W*H/2),1)
else:
  print(float(W*H/2),0)

Buggy submission (verdict: Runtime Error):
W, H, x, y = map(int,input().split())
buf_x = W-x
buf_y = H-y
if buf_x >= x:
  ver_area = H*x
else:
  ver_area = H*buf_x
if buf_y >= y:
  hori_area = W*y
else:
  hori_area = W*buf_y

if x*2 == W and y*2 ==H:
  print(float(W*H/2),1)
elif x*2 == W:
  print(float(W*H/2),0)
elif y*2 == H:
  print(float(W*H/2),0)
else:
  if W*y == H*x:
    print(float(W*H/2),0)
  elif x*H == W*(H-Y):
    print(float(W*H/2),0)
  else:
    if ver_area <= hori_area:
      print(float(hori_area),0)
    else:
      print(float(ver_area),0)

Buggy submission (verdict: Runtime Error):
W, H, x, y = map(int,input().split())
buf_x = W-x
buf_y = H-y
if buf_x >= x:
  ver_area = H*x
else:
  ver_area = H*buf_x
if buf_y >= y:
  hori_area = W*y
else:
  hori_area = W*buf_y

if H/W == y/x:
  print(float(ver_area),1)
else:
  if ver_area <= hori_area:
    print(float(hori_area),0)
  else:
    print(float(ver_area),0)
Problem p02983 (python)

Fixed submission:
L, R = map(int, input().split())
ans_l = []
if R-L<2019:
    for i in range(L,R):
        for j in range(i+1,R+1):
            ans = (i*j)%2019
            ans_l.append(ans)
    print(min(ans_l))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
L, R = map(int, input().split())
ans_l = []
if R-L<2019:
    for i in range(L,R):
        for j in range(i+1,R+1):
            ans = (i*j)%2019
            ans_l.append(ans)
    print(min(ans_l)):
else:
    print(0)

Buggy submission (verdict: Runtime Error):
L, R = map(int, input().split())
ans_l = []
for i in range(L,R):
    for j in range(i+1,R+1):
        ans = (i*j)%2019
        if ans !=0:
            ans_l.append(ans)
        else:
            ans_l.append(0)
            break;
print(min(ans))
Problem p03000 (python)

Fixed submission:
N, X = [int(item) for item in input().split()]
L = [int(item) for item in input().split()][::-1]
D = 0
count = 0
while D <= X:
  if len(L)>0:
    l = L.pop()
    D += l
    count += 1
  else:
    count += 1
    break
  
print (count)

Buggy submission (verdict: Runtime Error):
N, X = [int(item) for item in input().split()]
L = [int(item) for item in input().split()][::-1]
D = 0
count = 0
while D <= X:
  l = L.pop()
  D += l
  count += 1
print (count)
Problem p03001 (python)

Fixed submission:
W, H, x, y = [int(item) for item in input().split()]
S = W * H
ans_m = 0
if (W == 2*x and H==2*y):
  ans_m = 1
print (S/2, ans_m)

Buggy submission (verdict: Runtime Error):
W, H, x, y = [int(item) for item in input().split()]
S = W * H
m = max(min(x/W, 1-x/W), min(y/H, 1-y/H))
ans_s = S * m
ans_m = 0
if (W/x == 2 and H/y==2):
  ans_m = 1
print (ans_s, ans_m)
Problem p03032 (python)

Fixed submission:
a,k=map(int,input().split())
L=list(map(int,input().split()))
ans=0
 
for i in range(min(k,a)+1):
  for j in range(min(k,a)-i+1):
    S=[0]+L[:i]+L[a-j:]
    S.sort()
    x=0
    while x < k-(j+i):
      if S[x]>=0:
        break
      x+=1
    ans=max(ans,sum(S)-sum(S[:x]))
    
print(ans)

Buggy submission (verdict: Runtime Error):
a,k=map(int,input().split())
L=list(map(int,input().split()))
ans=0
 
for i in range(min(k,a)+1):
  for j in range(min(k,a)-i+1):
    S=L[:i]+L[a-j:]
    S.sort()
    x=0
    while x < k-(j+i):
      if S[x]>=0:
        break
      x+=1
    ans=max(ans,sum(S)-sum(S[:x]))
    
print(ans)
Problem p03049 (python)

Fixed submission:
n=int(input())
s=[0]*n
ct=0
a=0
b=0
c=0
for i in range(n):
    s[i]=input()
for i in range(n):
    for j in range(len(s[i])):
        t=s[i]
        ts=list(t)
        ts.append(0)
        if ts[j]=='A' and ts[j+1]=='B':
            ct+=1
    if ts[0]=='B' and ts[len(s[i])-1]!='A':
        a+=1
    if ts[len(s[i])-1]=='A' and ts[0]!='B':
        b+=1
    if ts[0]=='B' and ts[len(s[i])-1]=='A':
        c+=1
ct += max(0,c -1)
if c !=0:
  if a > 0 and b >0:
    ct += 2 + min(a-1,b-1)
  elif a>0:
    ct += 1 + min(a-1,b)
  elif b>0:
    ct += 1 + min(a,b-1)
else:
  ct += min(a,b)
print(ct)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[0]*n
ct=0
a=0
b=0
c=0
for i in range(n):
    s[i]=input()
for i in range(n):
    for j in range(len(s[i])):
        t=s[i]
        ts=list(t)
        ts.append(0)
        if ts[j]=='A' and ts[j+1]=='B':
            ct+=1
    if ts[0]=='B' and ts[len(s[i])-1]!='A':
        a+=1
    if ts[len(s[i])-1]=='A' and ts[0]!='B':
        b+=1
    if ts[0]=='B' and ts[len(s[i])-1]=='A':
        c+=1
ct += max(0,c -1)
if c !=0:
  if a > 0 and b >0:
    ct += 2 + min(a-1,b-1)
  elif head>0:
    ct += 1 + min(a-1,b)
  elif last>0:
    ct += 1 + min(a,b-1)
else:
  ct += min(a,b)
print(ct)

Buggy submission (verdict: Runtime Error):
N = int(input())
res = 0
both = 0
h = 0
b = 0
for i in range(N):
  inp = input()
  if 'AB' in inp:
    res += 1
  if 'B'==inp[0] and 'A'==inp[-1]:
    both+=1
  elif 'B'==inp[0]:
    # print (inp)
    h+=1
  elif 'A'==inp[-1]:
    # print (inp)
    b += 1
if max(h,b)>0 or both==0:
    print(res+min(h,b)+both)
elif max(a,b)==0:
    print(res+both-1)
Problem p03071 (python)

Fixed submission:
inputs = [int(i) for i in input().split()]
res = 0
res += max(inputs)
max_idx = inputs.index(max(inputs))
inputs[max_idx] -= 1
res += max(inputs)
print (res)

Buggy submission (verdict: Runtime Error):
N, K = [int(i) for i in input().split()]
s = input()
S = [int(s[i]) for i in range(len(s))]

for i in range(K):
    pair = []
    temp = 0
    for i in range(N):
        if i <= N-1:
            if (S[i]==0 and S[i+1]==0):
                temp += 1
            elif(S[i]==0):
                pair.append([i-temp,temp])
                temp = 0
        else:
            if(S[i]==0):
                pair.append([i,temp])
                temp = 0
    max_m = 0
    max_s = []
    for i in range(len(pair)):
        temp = S.copy()
        s, l = pair[i]
        for j in range(l+1):
            temp[s+j]=1
        m = cal_l(temp, N)
        if (m > max_m):
            max_m = m
            max_s = temp.copy()
    S = max_s.copy()
print (max_m)
Problem p03251 (python)

Fixed submission:
head=[int(n) for n in input().split()]
list_x=[int(n) for n in input().split()]
list_x.append(head[2])
list_y=[int(n) for n in input().split()]
list_y.append(head[3])
if max(list_x) < min(list_y):
    print("No War")
else:
    print("War")

Buggy submission (verdict: Runtime Error):
head=[int(n) for n in input.readline().split()]
list_x=[int(n) for n in input.readline().split()]
list_x.append(head[2])
list_y=[int(n) for n in input.readline().split()]
if max(list_x) < min(list_y):
    print("No War")
else:
    print("War")
Problem p03254 (python)

Fixed submission:
headData = input().split()
candyTotal = int(headData[1])
childList = [ int(n) for n in input().split()]
childList.sort()
childTotal = sum(childList)

if candyTotal == childTotal:
    print(len(childList))
elif candyTotal > childTotal:
    print(len(childList)-1)
else:
    answer=0
    childSum=0
    for child in childList:
        childSum = childSum + child
        if childSum > candyTotal:
            print(answer)
            exit()
        else:
            answer = answer + 1
    print(answer-1)

Buggy submission (verdict: Runtime Error):
headData = input().split()
candyTotal = int(headData[1])
childList = [ int(n) for n in input().split()]
childList.sort()
childTotal = sum(childList)

if candyTotal == childTotal:
    print(len(childList))
elif candyTotal == childTotal:
    print(len(childList)-1)
else:
    answer=0
    childSum=0
    for child in childList:
        childSum = childSum + child
        if childSum > candyTotal:
            print(answer)
            exit()
        else:
            answer = answer + 1
print(answer-1)
Problem p03261 (python)

Fixed submission:
dataNum=int(input())
wordList=[]
for n in range(dataNum):
    wordList.append(input().strip())

if len(wordList) != len(set(wordList)):
    print("No")
    exit()

char = wordList[0][-1:]
for n in range(1, len(wordList)):
    if(char != wordList[n][:1]):
        print("No")
        exit()
    char = wordList[n][-1:]

print("Yes")

Buggy submission (verdict: Runtime Error):
dataNum=input()
wordList=[]
for word in input:
    wordList.append(word.strip())

if len(wordList) != len(set(wordList)):
    print("No")
    exit()

char = wordList[0][-1:]
for n in range(1, len(wordList)):
    if(char != wordList[n][:1]):
        print("No")
        exit()
    char = wordList[n][-1:]

print("Yes")
Problem p03292 (python)

Fixed submission:
data = [int(n) for n in input().split()]
print(max(data)-min(data))

Buggy submission (verdict: Runtime Error):
headData = [int(n) for n in input().split()]
islandNum = headData[0]
requestNum = headData[1]
requestList = []
count = 0
for n in range(requestNum):
    request = [int(elem) for elem in input().split()]
    requestList.append(request)


while (len(requestList) != 0):
    print(count)
    # 優先度チェック
    bridgePriority = islandNum * [0]
    for request in requestList:
        for j in range(request[0], request[1]):
            bridgePriority[j] += 1
    deleteBridgeList = []

    print(max(bridgePriority))
    # 優先度が最も高い橋を特定
    for index in range(len(bridgePriority)):
        if (bridgePriority[index] == max(bridgePriority)):
            deleteBridgeList.append(index)

    print(deleteBridgeList)
    # 橋を削除した場合、叶っていないリクエストリストを作成
    newRequestList = []
    for request in requestList:
        for bridge in deleteBridgeList:
            isUnsolvedBridge = True
            if (request[0]<=bridge and bridge<request[1]):
                isUnsolvedBridge=False
                break
        if isUnsolvedBridge:
            newRequestList.append(request)
    requestList = newRequestList
    print(requestList)
    count += len(deleteBridgeList)

print(count)
Problem p03324 (python)

Fixed submission:
headerData = input().split()
d = int(headerData[0])
n = headerData[1]
if n == "100":
    n = "101"
answer = n + "00" * d
print(answer)

Buggy submission (verdict: Runtime Error):
headerData = input.split()
d = int(headerData[0])
n = headerData[1]
if n == "100":
    n = "101"
answer = n + "00" * d
print(answer)
Problem p03409 (python)

Fixed submission:
num=int(input())
a_array=[]
b_array=[]
for n in range(2*num):
    elem=[int(n) for n in input().split()]
    if n < num:
        a_array.append(elem)
    else:
        b_array.append(elem)
a_array.sort(key=lambda x:x[1])
a_array.reverse()
b_array.sort(key=lambda x: x[0])
answer=0
for b_x, b_y in b_array:
    for a_x, a_y in a_array:
        if b_x > a_x and b_y > a_y:
            answer=answer+1
            a_array.remove([a_x,a_y])
            break;
print(answer)

Buggy submission (verdict: Runtime Error):
    num=int(input())
    a_array=[]
    b_array=[]
    for n in range(2*num):
        elem=[int(n) for n in input().split()]
        if n < num:
            a_array.append(elem)
        else:
            b_array.append(elem)
    a_array.sort(key=lambda x:x[1])
    a_array.reverse()
    b_array.sort(key=lambda x: x[0])
    answer=0
    for b_x, b_y in b_array:
        for a_x, a_y in a_array:
            if b_x > a_x and b_y > a_y:
                answer=answer+1
                a_array.remove([a_x,a_y])
    print(answer)
Problem p02993 (python)

Fixed submission:
a=str(input())
b=''
r='Good'
for c in a:
    if b == c:
        r='Bad'
        break
    else:
        b = c
print(r)

Buggy submission (verdict: Runtime Error):
a=str(nput())
b=''
r='Good'
for c in a:
    if b == c:
        r='Bad'
        break
    else:
        b = c
print(r)
Problem p03000 (python)

Fixed submission:
a,b=map(int, input().split())
list = input().split(' ')

s = 0
c = 1

for item in list:
    if (s + int(item)) <= b:
        c += 1
        s += int(item)
    else:
        break

print(c)

Buggy submission (verdict: Runtime Error):
a,b=map(int, inout().split())
list = input().split(' ')

s = 0
c = !

for item in list:
    c += 1
    if (s + int(item)) <= b:
        s += int(item)
    else:
        break

print(c)