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

Fixed submission:
    
n = int(input())
    
P = list(map(int, input().split()))
cnt = 0
for i in range(1, n-1):
    if (P[i-1] < P[i] < P[i+1]) or (P[i-1] > P[i] > P[i+1]):
        cnt += 1
    
print(cnt)

Buggy submission (verdict: Runtime Error):

n = int(input())
P = [i for i in range(n)]
cnt = 0
for i in range(1:n-1):
    if (P[i-1] < P[i] < P[i+1]) or (P[i-1] > P[i] > P[i+1]):
        cnt += 1
print(cnt)
Problem p03000 (python)

Fixed submission:
N, X = map(int, input().split())    
L = list(map(int, input().split()))
    
cnt = 1
    
a = 0

    
for i in range(len(L)):
    a += L[i]
    if a <= X:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    cnt = 1
    a = 0

    for i in range(len(L)):
        a += L[i]
        if a <= X:
            cnt += 1
    print(cnt)

Buggy submission (verdict: Runtime Error):
    N, X = map(int, input().split())
    L = list(map(int, input().split()))
    cnt = 1
    a = 0

    for i in range(len(L)):
        a += L[i]
        if a <= X:
            cnt += 1
    print(cnt)
Problem p03160 (python)

Fixed submission:
n = int(input())
H = list(map(int, input().split()))
dp = [float("inf") for _ in range(n)]  # 最小化問題なのでinfで初期化
dp[0] = 0  # 初期条件
dp[1] = dp[0] + abs(H[1]-H[0])  #　初期条件2

for i in range(2, n):
    dp[i] = min(dp[i], dp[i-1] + abs(H[i]-H[i-1]))
    dp[i] = min(dp[i], dp[i-2] + abs(H[i]-H[i-2]))
print(dp[n-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [0] * N
B = [0] * N
C = [0] * N
for i in range(N):
    A[i], B[i], C[i] = map(int, input().split())
dp = [[0] * 3 for _ in range(N)]  # 初期化　[[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] for n = 4
dp[0] = [A[0], B[0], C[0]]

for i in range(N-1):
    dp[i+1][0] = max(dp[i][1]+A[i+1], dp[i][2]+A[i+1])
    dp[i+1][1] = max(dp[i][0]+B[i+1], dp[i][2]+B[i+1])
    dp[i+1][2] = max(dp[i][0]+C[i+1], dp[i][1]+C[i+1])
print(max(dp[N-1]))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
dp = [float("inf") for _ in range(n)]  # 最小化問題なのでinfで初期化
dp[0] = 0  # 初期条件
 
dp[1] = dp[0] + abs(H[1] - H[0])  # 初期条件2
 
for i in range(n - 1):  # 配るDP
    for j in  range(1, min(k+1, n-i)):
        dp[i + j] = min(dp[i + j], dp[i] + abs(H[i + j] - H[i]))
print(dp[n - 1])

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
dp = [float("inf") for _ in range(n)]  # 最小化問題なのでinfで初期化
dp[0] = 0  # 初期条件
 
dp[1] = dp[0] + abs(H[1] - H[0])  # 初期条件2
 
for i in range(n - 1):  # 配るDP
    for j in  range(1, min(k+1, n-i)):
        dp[i + j] = min(dp[i + j], dp[i] + abs(H[i + j] - H[i]))
print(dp[n - 1])
Problem p03161 (python)

Fixed submission:
N, K = map(int, input().split())
*h, = map(int, input().split())
dp = [float("inf") for _ in range(N)]
dp[0] = 0
for i in range(N - 1):
	for j in range(1, min(K + 1, N - i)):
		dp[i + j] = min(dp[i + j], dp[i] + abs(h[i + j] - h[i]))
print(dp[N - 1])

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
dp = [float("inf") for _ in range(n)]  # 最小化問題なのでinfで初期化
dp[0] = 0  # 初期条件

dp[1] = dp[0] + abs(H[1] - H[0])  # 初期条件2

for i in range(n - 1):  # 配るDP
    for j range(1, min(k+1, n-i))
        dp[i + j] = min(dp[i + j], dp[i] + abs(H[i + j] - H[i]))
print(dp[n - 1])
Problem p03162 (python)

Fixed submission:
N = int(input())
Y = []
for _ in range(N):
    Y.append(list(map(int, input().split())))  # Y = [[3, 9, 7], [10, 3, 2]]
dp = [[0] * 3 for _ in range(N)]  # 初期化
dp[0] = Y[0]  # 初期化

# A, B, C の3パターン以外にも対応
for i in range(N-1):
    for j in range(3):
        for k in range(3):
            if j == k:
                continue
            dp[i+1][j] = max(dp[i+1][j], dp[i][k] + Y[i+1][j])
print(max(dp[N-1]))

Buggy submission (verdict: Runtime Error):
N = 3
A=[[10, 40, 70], [20, 50, 80], [30, 60, 90]]
dp = [[0] * 3 for _ in range(N)]  # 初期化
dp[0] = A[0]  # 初期化
print(dp[0])
for i in range(N-1):
    for j in range(3):
        for k in range(3):
            if j == k:
                continue
            dp[i+1][k] = max(dp[i+1][k], dp[i][j] + A[i][k])
print(max(dp[N-1])
Problem p03543 (python)

Fixed submission:
a, b, c, d = input() # 1114
print("Yes" if a==b==c or b==c==d else "No")

Buggy submission (verdict: Runtime Error):
a, b, c, d = input() # 1114
print("Yes" if a==b==c or b==c==d else "No")

n=input()
print("Yes" if n[0]==n[1]==n[2] or n[0]==n[1]==n[2] else "No")
Problem p02811 (python)

Fixed submission:
K, X = map(int, input().split())

if K*500 >= X:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if K*500 > X:
  print('Yes')
else:
  print('No')
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
N = int(input())
count = 0

for i in range (a+1):
    for j in range (b+1):
        for k in range (c+1):
            if i*500 + j*100 + k*50 == N:
                count += 1
                #print("{} = 500:{} 100:{} 50:{}".format(N, i, j, k))
                

print(count)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
N = int(input())

for i in range (a):
    for j in range (b):
        for k in range (c):
            if i * 50 + j * 100 + k * 500 == N:
                count += count

print(count)
Problem p03069 (python)

Fixed submission:
N = int(input())
S = input()
# . = しろ
# # = 黒
# #の横に.がないようにしたい
# #の横に.があったら#を.に変える
# or #の横に.があったら.を#に変える

# when do you replace now char to .
# 

# テストケース
"""
3
#..

3
##.
"""
# => .....# = 2

def inorderReplace(S , N): 
    S = list(S)
    cnt = 0
    for i in range(N - 1) : 
        nowChar = S[i]
        nextChar = S[i + 1]
        if nowChar == "#" and nextChar == "." : 
            cnt += 1
            S[i + 1] = "#"
    return cnt

def calcCount(S , N) : 
    countingChar = S[0]
    rst = []
    count = 1
    for s in S[1:] :
        if countingChar == s : 
            count += 1
        else : 
            rst.append((countingChar , count))
            count = 1
            countingChar = s
    rst.append((countingChar , count))
    return rst

def countRightChange(countingList) : 
    #全部を.に変えるコスト
    cnt = 0
    for elem in countingList : 
        if elem[0] == "#" : 
            cnt += elem[1]
    return cnt

def countLeftChange(countingList) : 
    # 全部を#に変えるコスト
    cnt = 0
    for elem in countingList : 
        if elem[0] == "." : 
            cnt += elem[1]
    return cnt

def calcPoint(countingList) : 
    a = 0
    b = countLeftChange(countingList)
    minVal = a + b
    for i in range(len(countingList)) : 
        elem = countingList[i]
        if elem[0] == "." : 
            a += 0
            b -= elem[1]
        elif elem[0] == "#" : 
            a += elem[1]
            b -= 0
        if minVal > a + b : 
            minVal = a + b
    return minVal

countingList = calcCount(S , N)
cnt2 = calcPoint(countingList)

print(cnt2)

Buggy submission (verdict: Runtime Error):
def inorderReplace(S , N): 
    S = list(S)
    cnt = 0
    for i in range(N - 1) : 
        nowChar = S[i]
        nextChar = S[i + 1]
        if nowChar == "#" and nextChar == "." : 
            cnt += 1
            S[i + 1] = "#"
    return cnt

def preorderReplace(S , N) : 
    S = list(S)
    cnt = 0
    for i in reversed(range(1, N)) : 
        nowChar = S[i]
        prevChar = S[i - 1]
        if prevChar == "#" and nowChar == "." : 
            cnt += 1
            S[i - 1] = "."
    return cnt


cnt = inorderReplace(S , N)
cnt2 = preorderReplace(S , N)
print(min(cnt , cnt2))
Problem p03131 (python)

Fixed submission:
def func(K , A , B) : 
    if B >= A + 3 :
        if (K - A + 1) % 2 == 0 : 
            n = int((K - A + 1) / 2)
            return n * (B - A) + A 
        else : 
            n = int((K - A) / 2)
            return n*(B - A) + A + 1
    else : 
        return K + 1


s = input().split(" ")
print( int(func( int(s[0]) , int(s[1]) , int(s[2]) )) )

Buggy submission (verdict: Runtime Error):
"""

問題文

すぬけ君は最初、ビスケットを 1 枚持っており、日本円は持っていません。 すぬけ君は、以下の操作を好きな順に合計ちょうど K 回行います。

    持っているビスケットを叩き、1 枚増やす
    ビスケット A 枚を 1 円に交換する
    1 円をビスケット B 枚に交換する

K 回の操作の後、すぬけ君が持っているビスケットの枚数の最大値を求めてください。
制約

    1≤K,A,B≤109
    K,A,B は整数である
"""

def func(K , A , B) : 
    if B >= A + 3 :
        #売って買ってで(B - A)枚手に入る(ただし2回消費する)
        #まずは手持ちをAまいに持っていく必要がある。
        #売って買ってをn回繰り返す
        #最後に１回余ったら1叩く
        # K - (A - 1) = 2 * n + r
        # K - (A - 1)を計算し、偶数であれば n*(B - A) + A (n = (K - A + 1) / 2)
        # 奇数であれば n = (K - A) / 2として n*(B - A) + A + 1
        if (K - A + 1) % 2 == 0 : 
            n = int((K - A + 1) / 2)
            return n * (B - A) + A 
        else : 
            n = int((K - A) / 2)
            return n*(B - A) + A + 1
    else : 
        #叩き続けたほうがいい
        return K + 1

if not func(4 , 2 , 6) == 7 : 
    print("test 1 fail")

if not func(7 , 3, 4) == 8 : 
    print("test 2 fail")

if not func(314159265 , 35897932 , 384626433) == 48518828981938099 : 
    print(f"{int(func(314159265 , 35897932 , 384626433)) } != 48518828981938099")
    print("test 3 fail")

s = input().split(" ")
print( int(func( int(s[0]) , int(s[1]) , int(s[2]) )) )
Problem p03455 (python)

Fixed submission:
# coding: utf-8
# Here your code !
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

s = input().split(" ")
s = [int(i) for i in s]
x = s[0] * s[1]
if x % 2 == 0 : 
    print("Even")
else : 
    print("Odd")

Buggy submission (verdict: Runtime Error):
    s = input().split(" ")
    s = [int(i) for i in s]
    x = s[0] * s[1]
    if x % 2 == 0 : 
        print("Even")
    else : 
        print("Odd")
Problem p03550 (python)

Fixed submission:
# coding: utf-8
# Here your code !
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
 
import numpy as np
import bisect

N , Z ,W = input().split()
N = int(N)
Z = int(Z)
W = int(W)
a = input().split()
a = [int(i) for i in reversed(a)]

if N == 1 : 
    print(np.abs(W - a[0]))
else : 
    rst = [ np.abs(W - a[0]) , np.abs(a[1] - a[0]) ]
    print(np.max(rst))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Here your code !
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
 
import numpy as np
import bisect

N , Z ,W = input().split()
N = int(N)
Z = int(Z)
W = int(W)
a = input().split()
a = [int(i) for i in reversed(a)]

rst = [ np.abs(W - a[0]) , np.abs(a[1] - a[0]) ]
print(np.max(rst))
Problem p03589 (python)

Fixed submission:
# coding: utf-8
# Here your code !
N = int(input())

w = 0
for h in range(1 , int(3*N/4 )+ 1) : 
    if w != 0 : 
        h -= 1
        break
    x = 4 / N - 1 / h
    if x <= 0 : continue
    for n in range(1 , int(2/(4/N - 1/h)) + 1) : 
        if (4*h*n - N*n - N*h)  <= 0 : continue
        if (N*h*n) % (4*h*n - N*n - N*h)  == 0 : 
            w = int((N*h*n) / (4*h*n - N*n - N*h) )
            break
        
print(h ,n,w)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Here your code !
N = int(input())

w = 0
for h in range(1 , 3501) : 
    if w != 0 : break
    x = 4 / N - 1 / h
    if x <= 0 : continue
    for n in range(1 , 3501) : 
        y = x - 1/n
        if y <= 0 : continue
        if n % (x*n - 1)  == 0 : 
            w = int(n / (n*x - 1))
            break
        
print(h - 1,n,w)
Problem p03591 (python)

Fixed submission:
# coding: utf-8
# Here your code !

s = input()
if(len(s) < 4) : print("No")
else:
    if(s[0:4] == "YAKI") : print("Yes")
    else:print("No")

Buggy submission (verdict: Runtime Error):
1. 学部学科／研究科専攻の中身（大学の紹介ではなく、自分が大学で勉強していることの説明）
2. 自分の中心テーマ、素材、対象（専門家向けバージョンと、専門家以外でもわかるバージョンがあると便利）
3. その勉強を通じて得られる成果、結論、応用、実用（特に基礎系の専門の場合、「応用」を幅広くとらえることが欠かせない）
4. ユニークさ（独自の視点、手法、対象、成功率（失敗率））
Problem p03659 (python)

Fixed submission:

s = input().split()
s = [int(i) for i in s]
N = s[0]

s = input().split()
a = [int(i) for i in s]

L = [0] * N
L[0] = a[0] - sum(a[1 : ])

if N == 2 : 
    print(abs(a[0] - a[1]))
else : 
    MIN = float("inf")
    for i in range(1 , N - 1 ) : 
        L[i] = L[i - 1] + 2 * a[i]
        if MIN > min( abs(L[i]) , abs(L[i - 1])) : MIN = min( abs(L[i]) , abs(L[i - 1]))
    print(MIN)

Buggy submission (verdict: Runtime Error):
s = input().split()
s = [int(i) for i in s]
N = s[0]

s = input().split()
a = [int(i) for i in s]

L = [0] * N
L[0] = a[0] - sum(a[1 : ])

if N == 2 : 
    print(abs(a[0] - a[1]))
else : 
    MIN = float("inf")
    for i in range(1 , N - 1 ) : 
        L[i] = L[i - 1] + 2 * a[i]
        if L[i] * L[i - 1] <= 0 : 
            if MIN > min( abs(L[i]) , abs(L[i - 1])) : MIN = min( abs(L[i]) , abs(L[i - 1]))

print(MIN)
Problem p02768 (python)

Fixed submission:
mod = int(1e9 + 7)
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
            result %= mod

    return result


n, a, b = map(int, input().split())

base = 1
waru = 1000
syou = n // waru
amari = n % waru
kakeru = 2**waru % mod
for _ in range(syou):
    base = base * kakeru
    base %= mod
base = base * 2**amari
base %= mod

nca = cmb(n, a%mod)
ncb = cmb(n, b%mod)
answer = (base - 1 - nca - ncb) % mod
print(answer)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
nca = len(list(itertools.combinations(range(n), a)))
ncb = len(list(itertools.combinations(range(n), b)))
# answer = 2**n - 1 - nca - ncb
# print(answer % (10**9 + 7))
print((2**n - 1 - nca - ncb) % (10**9 + 7))
Problem p02853 (python)

Fixed submission:
x, y = input().split()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 and int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)

Buggy submission (verdict: Runtime Error):
x, y = input(), input()
price = 0
try:
    if 1 <= int(x) <= 205 and 1 <= int(y) <= 205:
        if int(x) == 1 or int(y) == 1:
            price += 400000
        if int(x) == 1:
            price += 300000
        elif int(x) == 2:
            price += 200000
        elif int(x) == 3:
            price += 100000
        if int(y) == 1:
            price += 300000
        elif int(y) == 2:
            price += 200000
        elif int(y) == 3:
            price += 100000

    print(price)
except:
    print(price)
Problem p02784 (python)

Fixed submission:
h, n = map(int, input().split())
a = [int(x) for x in input().split()]

h -= sum(a)

if h <= 0:
    print('Yes')
else:
    print('No')

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

a = [map(int, input().split()) for _ in range(n)]

h -= sum(a)
if h <= 0:
    print('Yes')
else:
    print('No')

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

a = [map(int, input().split()) for _ in range(n)]
print(a)
for i in a:
    h -= a
if h <= 0:
    print('Yes')
else:
    print('No')
Problem p02853 (python)

Fixed submission:
x, y = map(int, input().split(" "))
 
total = 0
 
rewards = {1: 300000, 2: 200000, 3: 100000}

x1 = rewards[x] if (x <= 3) else 0
y1 = rewards[y] if (y <= 3) else 0
 
if (x == 1 and y ==  1):
  total += 400000
if (x1 != None):
  total += x1
if (y1 != None):
  total += y1
 
print(total)

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())

total = 0

rewards = {1: 300000, 2: 200000, 3: 100000}

x1 = rewards[x]
y2 = rewards[y]

if (x == 1 and y ==  1):
  	total += 400000
total += (x1 + y1)

print(total)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if(a == 1 & b == 1)
	pass
Problem p02767 (python)

Fixed submission:
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
P = int(sum(X) / N + 0.5)
total = 0
for x in X:
  kyori = (x - P) * (x - P)
  total += kyori
print(total)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
MAX = max(X)
res = []
for a in range(1, MAX):
  total = 0
  for x in X:
    kyori = (x - a) * (x - a)
    total += kyori
  res.append(total)
print(min(res))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N = int(input())
X = [int(x) for x in input().split()]
MAX = max(X)
res = []
for a in range(1, int(MAX)):
  total = 0
  for x in X:
    kyori = (x - a) * (x - a)
    total += kyori
  res.append(total)
print(min(res))
Problem p02767 (python)

Fixed submission:
N = int(input())
X = list(map(int, input().split()))
X_min = min(X)
X_max = max(X)
S = []
if X_min == X_max:
    S.append(0)
for x in range(X_min, X_max):
    s = 0
    for i in range(N):
        s += (X[i]-x)**2
    S.append(s)
print(min(S))

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
X_min = min(X)
X_max = max(X)
S = []
for x in range(X_min, X_max):
    s = 0
    for i in range(N):
        s += (X[i]-x)**2
    S.append(s)
print(min(S))
Problem p02909 (python)

Fixed submission:
s = input()
 
if s == 'Sunny':
    print('Cloudy')
elif s == 'Cloudy':
    print('Rainy')
elif s == 'Rainy':
    print('Sunny')

Buggy submission (verdict: Runtime Error):
import math
N,M=map(int,input().split())
l = [int(s) for s in input().split()]

for i in range(M):
  math.floor(l[l.index(max(l))] = l[l.index(max(l))]/2)

p = 0
for i in range(N):
  p += l[i]
print(p)

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

list = ['Sunny', 'Cloudy', 'Rainy']

for item in list:
  if (item == 'Sunny' and input == 'Sunny':
    print 'Cloudy'
  elif item == 'Cloudy' and input == 'Cloudy':
    print 'Rainy'
  elif item = 'Rainy' and input == 'Rainy':
    print 'Sunny'
Problem p02923 (python)

Fixed submission:
str = [input() for i in range(2)]
nums = list(map(int, str[1].split()))
maxCount = 0
index = -1
count = 0

for i in range(len(nums)-1):
    if nums[i] >= nums[i+1]:
        count = count + 1
        if count >= maxCount:
            maxCount = count
    else:
        count = 0
        
print(maxCount)

Buggy submission (verdict: Runtime Error):
str = [input() for i in range(2)]
nums = list(map(int, str[1].split()))
maxCount = 0
idx = 0
index = 0
count = 0

for i in range(len(nums)-index-1):
    if nums[index+i] >= nums[index+i+1]:
        count = count + 1
        idx = index+i+1
        index = index + 1
        if count >= maxCount:
            maxCount = count
    else:
        idx = 0
        count = 0
        break
        
print(maxCount)

Buggy submission (verdict: Runtime Error):
str = [input() for i in range(2)]
nums = list(map(int, str[1].split()))
maxCount = 0
idx = 0

for index, item in enumerate(nums):
    count = 0
    if idx > index:
        break
    for i in range(len(nums)-index-1):
        kaisuu += 1
        if nums[index+i] >= nums[index+i+1]:
            count = count + 1
            idx = index+i+1
            if count >= maxCount:
                maxCount = count
        else:
            break
        
print(maxCount)
Problem p02952 (python)

Fixed submission:
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Buggy submission (verdict: Runtime Error):
str = input()
num = int(str)
numbers = len(str)
print(numbers)
con = 0
a = str[-6:0]
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers>0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)
Problem p02811 (python)

Fixed submission:
A, B = input().split()
a = int(A)
b = int(B)
if(a*500<b):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
A, B = input().split()
a = int(A)
b = int(B)
if(a*500>=b):
  print(Yes)
else:
  print(No)
Problem p02830 (python)

Fixed submission:
n = int(input())
a ,b = input().split(" ")
s = ""
for x in range(n):
  s = s + a[x] + b[x]
print(s)

Buggy submission (verdict: Runtime Error):
5
aaaaa aaaaa
Problem p02802 (python)

Fixed submission:
from functools import reduce
N, M = list(map(int, input().split()))
ps_list = [input().split() for _ in range(M)]

result = {}
for row in ps_list:
  if not row[0] in result:
    result[row[0]] = {
        "AC": 0,
        "WA": 0
    }
  if result[row[0]]["AC"] > 0:
    continue
  else:
    result[row[0]][row[1]] = result[row[0]][row[1]] + 1

ac = 0
wa = 0
for k,v in result.items():
  ac = ac + v["AC"]
  if v["AC"] == 0:
    continue
  wa = wa + v["WA"]
print(ac, wa)

Buggy submission (verdict: Runtime Error):
from functools import reduce
N, M = list(map(int, input().split()))
ps_list = [input().split() for _ in range(M)]

result = {}
for row in ps_list:
  if not row[0] in result:
    result[row[0]] = {
        "AC": 0,
        "WA": 0
    }
  if result[row[0]]["AC"] > 0:
    continue
  else:
    result[row[0]][row[1]] = result[row[0]][row[1]] + 1

print(result)
ac = 0
wa = 0
for k,v in result.items():
  ac = ac + v["AC"]
  if v["AC"] = 0:
    continue
  wa = wa + v["WA"]
print(ac, wa)
Problem p02924 (python)

Fixed submission:
N = int(input())
N-=1
print(N*(N+1)//2)

Buggy submission (verdict: Runtime Error):
N = int(input())
C=[0]*(N-1)
for i in range(N-1):
	C[i]=i+1
print(sum(C))
Problem p02993 (python)

Fixed submission:
S = input()
C = 0
for i in range(3):
	if S[i] == S[i+1]:
		C = 1

if C == 1:
	print('Bad')
else:
	print('Good')

Buggy submission (verdict: Runtime Error):
N, L = (int(i) for i in input().split())
C = 0
S = 0

if L > 0:
	for i in range(N):
		if i > 0:
			S += L + i
elif L+N-1 < 0:
	for i in range(N):
		if i < N-1:
			S += L + i
else:
	for i in range(N):
		S += L + i

print(S)
Problem p03067 (python)

Fixed submission:
a,b,c=map(int,input().split())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')

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

if a<b:
    if a<c:
        if b>c
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')

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

if a<b:
    if a<c:
        if b>c
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==1:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
s='Yes'
z=0

if a<c:
    if b<c:
        z=1

if a>c:
    if b>c:
        z=1

if z=1:
    print('Yes')
else:
    print('No')