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

Fixed submission:
x,a=[int(x) for x in input().split(' ')]
if x<a:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
import sys
N,X=[int(x) for x in input().split(' ')]
arr=[int(x) for x in input().split(' ')]
temp=0
for x in range(N):
  if arr[x]+temp>X:
    print(x+1)
    sys.exit(1)
  else:
    temp+=arr[x]
print(N+1)

Buggy submission (verdict: Runtime Error):
x,a=[int(X) for x in input().split(' ')]
if x<a:
  print(0)
else:
  print(10)
Problem p02705 (python)

Fixed submission:
PI = 3.141
r = int(input())
print(2*PI*r)

Buggy submission (verdict: Runtime Error):
PI = 3.141
r = int(input())
print(2*1PI*r)
Problem p02999 (python)

Fixed submission:
import sys                                                                      
 
if __name__ == '__main__':
    s = input().strip().split(' ')
    x = int(s[0])
    a = int(s[1])
    if (x < a): 
        print('0')
    else:
        print('10')

Buggy submission (verdict: Runtime Error):
import sys                                                                      
 
if __name__ == '__main__':  
    x = sys.argv[1]
    a = sys.argv[2]
    if (x < a): 
        print('0')
    else:
        print('10')

Buggy submission (verdict: Runtime Error):
import sys

if __name__ == '__main__':  
    x, a = sys.argv[1].split(' ')
    if (x < a):
        printf('0')
    else:
        printf('10')

Buggy submission (verdict: Runtime Error):
import sys

if __name__ == '__main__':
  
  x, a = sys.argv[1].split(' ')
  if (x < a):
    printf('0')
  else:
    printf('10')
Problem p03071 (python)

Fixed submission:
s = input().split()
 
if int(s[0]) < int(s[1]):
  s1 = int(s[0])
  s2 = int(s[1])
else:
  s1 = int(s[1])
  s2 = int(s[0])
  
result = 0
if (s2-s1) >= 2:
  result = s2*2 - 1
else:
  result = s2 + s1
 
print(result)

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

if s[0] < s[1]:
  s1 = s[0]
  s2 = s[1]
else:
  s1 = s[1]
  s2 = s[0]
  
result = 0
if (s2-s1) > 2:
  result = s2*2 - 1
else (s2-s1) = 1:
  result = s2 + s1

print(result)
Problem p03624 (python)

Fixed submission:
# coding=utf-8
S = list(raw_input())

alpha = 'abcdefghijklmnopqrstuvwxyz'
t = True
for a in alpha:
    if a not in S:
        print a
        t = False
        break
if t:
    print None

Buggy submission (verdict: Runtime Error):
# coding=utf-8
S = list(raw_input())
S.sort()

alpha = 'abcdefghijklmnopqrstuvwxyz'
c = 0
t = True
for s in S:
    if alpha[c] != s:
        if alpha[c - 1] != s:
            print alpha[c]
            t = False
            break
        else:
            continue
    else:
        c += 1
if t:
    print 'None'
Problem p03713 (python)

Fixed submission:
H, W = map(int, raw_input().split())
best = H * W
S = [0, 0, 0]
for h in range(H):
    S[0] = h * W

    S[1] = (H - h) * (W / 2)
    S[2] = (H - h) * (W - W / 2)

    if best > max(S) - min(S):
        best = max(S) - min(S)

    S[1] = (H - h) / 2 * W
    S[2] = (H - h - (H - h) / 2) * W

    if best > max(S) - min(S):
        best = max(S) - min(S)
H, W = W, H
for h in range(H):
    S[0] = h * W

    S[1] = (H - h) * (W / 2)
    S[2] = (H - h) * (W - W / 2)

    if best > max(S) - min(S):
        best = max(S) - min(S)

    S[1] = (H - h) / 2 * W
    S[2] = (H - h - (H - h) / 2) * W

    if best > max(S) - min(S):
        best = max(S) - min(S)

print best

Buggy submission (verdict: Runtime Error):
H, W = map(int, raw_input().split())
best = H * W
for h in range(H):
    S[0] = h * W

    S[1] = (H - h) * (W / 2)
    S[2] = (H - h) * (W - W / 2)

    if best > max(S) - min(S):
        best = max(S) - min(S)

    S[1] = (H - h) / 2 * W
    S[2] = (H - h - (H - h) / 2) * W

    if best > max(S) - min(S):
        best = max(S) - min(S)
H, W = W, H
for h in range(H):
    S[0] = h * W

    S[1] = (H - h) * (W / 2)
    S[2] = (H - h) * (W - W / 2)

    if best > max(S) - min(S):
        best = max(S) - min(S)

    S[1] = (H - h) / 2 * W
    S[2] = (H - h - (H - h) / 2) * W

    if best > max(S) - min(S):
        best = max(S) - min(S)

print best
Problem p03719 (python)

Fixed submission:
a, b, c = map(int, raw_input().split())

print "Yes" if c >= a and c <= b else "No"

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

n, m = map(int, raw_input().split())
g = []
for i in range(m):
    g.append(map(int, raw_input().split()))

graph = {}
for i in g:
    if i[0] not in graph:
        graph[i[0]] = [[i[1], i[2]]]
    else:
        graph[i[0]].append([i[1], i[2]])

table = np.zeros(n + 1) + 0.5
table[1] = 0
fp = [1]
for i in range(n):
    for k in fp:
        if k in graph.keys():
            for j in graph[k]:
                if table[j[0]] < table[k] + j[1]:
                    table[j[0]] = table[k] + j[1]
                    if j[0] != n and fp not in [j[0]]:
                        fp.append(j[0])
                if table[j[0]] == 0.5:
                    table[j[0]] = table[k] + j[1]
                    if j[0] != n:
                        fp.append(j[0])
max = int(table[n])
fp.append(n)
flag = 0
for i in range(3):
    for k in fp:
        if k in graph.keys():
            for j in graph[k]:
                if table[j[0]] < table[k] + j[1]:
                    table[j[0]] = table[k] + j[1]
                    fp.append(j[0])
                if table[j[0]] == 0.5:
                    table[j[0]] = table[k] + j[1]
                    if j[0] != n:
                        fp.append(j[0])
                if max < int(table[n]):
                    print"inf"
                    flag = 1
                    break
        if flag == 1:
            break

    if flag == 1:
        break
if flag != 1:
    print int(table[n])
Problem p03729 (python)

Fixed submission:
a,b,c = raw_input().split()

if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")

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

def generate():
    newGen = np.zeros(n)
    for p in range(pop):
        gen = np.random.rand(n)
        for i in range(n):
            if gen[i] > 0.5:
                gen[i] = 1
            else:
                gen[i] = 0
        newGen = np.vstack([newGen,gen])
    newGen = np.vsplit(newGen,[1])[1]
    return newGen

def evaluate(gen):
    sum = np.zeros(pop)
    for p in range(pop):
        for i in range(n):
            sum[p] += v[i][1] * gen[p][i]
    sum = sum.reshape(pop, 1)
    gen = np.hstack([gen, sum])
    return gen

def best(gen):
    best0 = gen[0]
    for p in range(1,pop):
        if best0[-1] < gen[p][-1]:
            best0 = gen[p]
    return best0

def select(b,p):
    parents = np.zeros(b.shape[1])
    for i in range(p):
        p1 = b[np.random.randint(0, b.shape[0] - 1)]
        p2 = b[np.random.randint(0, b.shape[0] - 1)]
        if p1[-1] < p2[-1]:
            parents = np.vstack([parents, p2])
        else:
            parents = np.vstack([parents, p1])
    return np.vsplit(parents,[1])[1]

def crossover(parents):
    parents = np.hsplit(parents, [-1])[0]
    newGen = np.zeros(parents.shape[1])
    for i in range(parents.shape[0] / 2):
        l = np.random.randint(1, parents.shape[1] - 1)
        p1_0, p1_1 = np.hsplit(parents[i * 2], [l])
        p2_0, p2_1 = np.hsplit(parents[i * 2 + 1], [l])
        c1 = np.hstack([p1_0, p2_1])
        c2 = np.hstack([p1_1, p2_0])
        newGen = np.vstack([newGen, c1])
        newGen = np.vstack([newGen, c2])
    return np.vsplit(newGen, [1])[1]

def mutation(newGen):
    for p in range(pop):
        w_sum = 0
        for i in range(n):
            w_sum += newGen[p][i] * v[i][0]
        if w_sum > w:
            ran = np.random.permutation(np.arange(n))
            while(w_sum > w):
                ran, q = np.hsplit(ran,[-1])
                if newGen[p][q] == 1:
                    w_sum -= newGen[p][q] * v[q][0]
                    newGen[p][q] = 0
    return newGen


pop = 10
n, w = map(int,raw_input().split())
v = []
N = 500
for i in range(n):
    v.append(map(int,raw_input().split()))

eval = evaluate(generate())
c = mutation(crossover(select(eval,pop)))
eval = evaluate(c)
be = best(eval)
for i in range(N):
    c = mutation(crossover(select(eval,pop)))
    eval = evaluate(c)
    if be[-1] < best(eval)[-1]:
        be = best(eval)
print int(be[-1])
Problem p03206 (python)

Fixed submission:
d=int(input())
if d==25:
  print('Christmas') 
elif d==24:
  print('Christmas Eve')
elif d==23:
  print('Christmas Eve Eve')
else :
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
d=int(input())
if d=25:
  print('Christmas') 
elif d=24:
  print('Christmas Eve')
elif d=23:
  print('Christmas Eve Eve')
else :
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
d=int(input())
if d=25:
  print('christmas')
    
elif d=24:
  print('Christmas Eve')

elif d=23:
  print('Christmas Eve Eve')
else :
  print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
d=input()
if d=25:
  print('christmas')
    
elif d=24:
  print('Christmas Eve')

elif d=23:
  print('Christmas Eve Eve')
else :
  print('Christmas Eve Eve Eve')
Problem p03210 (python)

Fixed submission:
age=int(input())
if age==3:
  print ('YES')
elif age==5:
  print ('YES')
elif age==7:
  print ('YES')
else :
  print('NO')

Buggy submission (verdict: Runtime Error):
age=int(input())
if age==3,5,7:
  print('YES')
else :
  print('NO')

Buggy submission (verdict: Runtime Error):
age=int(input())
if age==3,5,7:
  print("YES")
else :
  print('NO')

Buggy submission (verdict: Runtime Error):
age=int(input())
if age==3,5,7:
  print"YES"
else :
  print('NO')
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
Alice=0
Bob=0
a.sort(reverse=True)
for i in range(N):
    if i % 2 == 0:
        Alice+=a[i]
    else:
        Bob+=a[i]
if Alice>Bob:
    print(Alice-Bob)
else:
    print(Bob-Alice)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
Alice=0
Bob=0
a.sort(reversed=True)
for i in range(N):
    if i % 2 == 0:
        Alice+=a[i]
    else:
        Bob+=a[i]
if Alice>Bob:
    print(Alice-Bob)
else:
    print(Bob-Alice)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
for i in range(N):
    if i % 2 ==0:
        Alice+=a[i]
    else:
        Bob+=a[i]
if Alice>Bob:
    print(Alice-Bob)
else:
    print(Bob-Alice)
Problem p03470 (python)

Fixed submission:
N=int(input())
d=[input() for i in range(N)]
sum=1
d.sort(reverse=True)
for i in range(1,N):
    if d[i-1]>d[i]:
        sum+=1
print(sum)

Buggy submission (verdict: Runtime Error):
N,Y=map(int,input().split())
x=-1
y=-1
z=-1
for i in range(N+1):
    for j in range(N+1):

        k=N-j-i
        sum = i*10000 + j*5000 + k*1000
        if Y==sum and i+j+k==N:
            x=i
            y=j
            z=k
            break

    else:
        continue
    break
print(str(x)+' '+str(y)+' '+str(z))

Buggy submission (verdict: Runtime Error):
N=int(input().split())
d=[input() for i in range(N)]
d.sort(reverse=True)
for i in range(1,N):
    if d[i-1]>d[i]:
        sum+=1
print(sum)
Problem p03478 (python)

Fixed submission:
n,a,b=map(int,input().split())
sum=0
for i in range(n+1):
     wa = int((i / 10000) % 10)+int((i / 1000) % 10) + int((i / 100) % 10) + int((i / 10) % 10)  + int(i % 10)
     if a <= wa and wa<=b:
         sum += i
print(sum)

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
sum=0
for i in range(n):
     if 2 <= i[-1] + i[-2] and i[-1] + i[-2] <=5:
         sum +=i[-1]+i[-2]
print(sum)
Problem p02724 (python)

Fixed submission:
money = int(input())
fh = money // 500
money -= 500 * fh
goen = money // 5

point = 1000 * fh + 5 * goen
print(point)

Buggy submission (verdict: Runtime Error):
money = int(input())
fh = n // 500
money -= 500 * fh
goen = money // 5

point = 1000 * fh + 5 * goen
print(point)
Problem p02730 (python)

Fixed submission:
s = input()
n = len(s)
zen = s[:n // 2]

kou= s[n // 2 + 1:]

s_rev = s[::-1]

zen_rev = zen[::-1]
kou_rev = kou[::-1]

if s == s_rev and zen == zen_rev and kou == kou_rev:
  print('Yes')
else:
  print('No')

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

def kaibun(string):
  index = 0
  ans = True
  while i < n-1-i:
    if s[i] != s[n-1-i]:
      ans = False
      return ans
      break
    index += 1
  return ans

ans_total = def(s)

zenhan = s[:n//2]
kouhan = s[n//2:]

ans_zen = def(zenhan)
ans_kou = def(kouhan)

if ans_total == True and ans_zen == True and ans_kou == True:
  print('Yes')
else:
  print('No')
Problem p02742 (python)

Fixed submission:
n, m = (int(x) for x in input().split())

if n == 1 or m == 1:
  ans = 1
else:
  if n % 2 == 0:
    ans = n * m // 2
  else:
    if m % 2 == 0:
      ans = n * m // 2
    else:
      ans = n * m // 2 + 1
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = (int(x) for x in input().split())
if n % 2 == 0:
  ans = n * m // 2
elif m % 2 == 0:
  m % 2==0:
  ans = n * m // 2
else:
  ans = (n * (m+1) // 2 )- n //2
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input()),m = int(input())
if n % 2 == 0:
  ans = n * m / 2
else:
  if m % 2==0:
    ans = ((n / 2 + 1) + n / 2) * m / 2
  else:
    ans = ((n / 2 + 1) + n / 2) * (m-1) / 2 + n / 2 + 1
print(ans)
Problem p02687 (python)

Fixed submission:
s = str(input())
if s == "ABC":
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
s = str(input())
if s == "ABC":
    print("ARC")
else:
    print(ABC)
Problem p02843 (python)

Fixed submission:
x = str(input())
lx = len(x)
num = lx - 2
if int(x) >= 100:
    head = int(x[:num])
    body = int(x[num:])
    up = head * 5
    ans = int(0)
    if body <= up:
        ans = 1
    else:
        ans = 0
else:
    ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
x = str(input())
lx = len(x)
num = lx - 2
head = int(x[:num])
body = int(x[num:])
up = head * 5
ans = int(0)
if body <= up:
    ans = 1
else:
    ans = 0
if int(x) > 615 * 1000000:
    ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
x = str(input())
lx = len(x)
num = lx - 2
head = int(x[:num])
body = int(x[num:])
up = head * 5
ans = int(0)
if body <= up:
    ans = 1
else:
    ans = 0
if x > 615 * 1000000:
    ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
x = str(input())
lx = len(x)
num = lx - 2
head = int(x[:num])
body = int(x[num:])
up = head * 5
if body <= up:
    print("1")
else:
    print("0")
Problem p02945 (python)

Fixed submission:
A,B = list(map(int,input().split()))
p = int(A + B)
m = int(A - B)
c = int(A * B)
s = [p,m,c]
print(max(s))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
p = int(A + B)
m = int(A - B)
c = int(A * B)
s = [p,m,c]
max(s)
Problem p03109 (python)

Fixed submission:
s = input()
before = ("Heisei")
after = ("TBD")
if s[6] == "1" and s[5] == "0":
    print(before)
elif s[6] == "2" and s[5] == "0":
    print(before)
elif s[6] == "3":
    print(before)
elif s[6] == "4":
    print(before)
else:
    print(after)

Buggy submission (verdict: Runtime Error):
s = input()
before("Heisei")
after("TBD")
if s[7] == 1 or s[7] == 2 or s[7] == 3 or s[7] == 4:
    print(before)
else:
    print(after)
Problem p03125 (python)

Fixed submission:
a,b = list(map(int,input().strip().split()))
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Buggy submission (verdict: Runtime Error):
a,b = list(map(int,input().strip()).split()))
ans1 = a + b
ans2 = b - a
if b % a == 0:
    print(ans1)
else:
    print(ans2)

Buggy submission (verdict: Runtime Error):
a,b = list(map(int,input().strip()).split())
ans1 = a + b
ans2 = b - a
if b % a == 0:
    print(ans1)
else:
    print(ans2)
Problem p02684 (python)

Fixed submission:
def resolve():
    N, K = map(int, input().split())
    A = tuple(map(int, input().split()))
    path = [1]
    for i in range(2*N):
        cur = A[path[-1]-1]
        path.append(cur)

    if K < N:
        print(path[K])
        exit()

    end = N
    si = N-1
    while path[si] != path[end]:
        si -= 1
    dist = end - si
    K = K % dist
    while K < N:
        K += dist

    print(path[K])

if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N, K = map(int, input().split())
    A = tuple(map(int, input().split()))
    C = [0]*N
    path = []
    cur = 1
    for i in range(K):
        C[cur-1] += 1
        path.append(cur)
        cur = A[cur-1]
        if C.count(2) >= 1:
            init_c = path.index(cur) + 1
            break
    MOD = (K+1) % (len(path) - 1)
    for i in range(init_c, init_c+MOD+1):
        init_c = A[init_c]
    print(init_c)

if __name__ == '__main__':
    resolve()
Problem p02765 (python)

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

if __name__ == '__main__':
        resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import statistics
    n = input()
    x = list(map(int, input().split()))
    m = round(statistics.mean(x))
    sum_val = 0
    for val in x:
        sum_val += (val - m) ** 2

    print(sum_val)

if __name__ == '__main__':
    resolve()
Problem p02767 (python)

Fixed submission:
import numpy as np

def resolve():
    input()
    x = list(map(int, input().split()))
    m = int(round(np.mean(x)))
    sum = 0
    for val in x:
        sum += (val - m) ** 2
    print(sum)

if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
import numpy as np
 
def resolve():
    input()
    x = list(map(int, input().split()))
    m = int(round(np.mean(x)))
    sum = 0
    for val in x:
        sum += (val - m) ** 2
    print(sum)
 
if __name__ == '__main__':
    resolve()

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

def resolve():
    input()
    x = list(map(int, input().split()))
    m = int(round(np.median(x)))
    sum = 0
    for val in x:
        sum += (val - m) ** 2
    print(sum)

if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import statistics
    n = input()
    x = list(map(int, input().split()))
    m = round(statistics.mean(x))
    sum_val = 0
    for val in x:
        sum_val += (val - m) ** 2

    print(sum_val)

if __name__ == '__main__':
    resolve()

Buggy submission (verdict: Runtime Error):
import statistics

def resolve():
    n = input()
    x = list(map(int, input().split()))
    m = round(statistics.mean(x))
    sum = 0
    for val in x:
        sum += (val - m) ** 2
    print(sum)

if __name__ == '__main__':
        resolve()
Problem p02713 (python)

Fixed submission:
import math
from functools import reduce
 
k = int(input())
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
kotae = 0
for i in range(k):
    a = i + 1
    for j in range(k):
        b = j + 1
        for l in range(k):
            c = l + 1
            koyakusu = gcd(a, b, c)
            kotae += koyakusu
print(kotae)

Buggy submission (verdict: Runtime Error):
n = int(input())
n_lst = []
for i in range(n):
    n_lst.append(i+1)
    
##共通
kosu = n // 15
 
##3の倍数
a3 = n // 3
lst3 = []
for i in range(a3):
    n3 = 3 * (i+1)
    lst3.append(n3)
 
##5の倍数
a5 = n // 5
lst5 = []
for i in range(a5):
    n5 = 5 * (i+1)
    lst5.append(n5)
 
kosu2 = a5 - kosu
    
###リストから取り除く.strip
for i in range(a3):
    n_lst.remove(lst3[i])
for i in range(kosu2):
    n_lst.remove(lst5[i])
    
goke = sum(n_lst)
print(goke)
Problem p02718 (python)

Fixed submission:
n,m = map(int,input().split())
a = list(map(int,input().split()))
sum_a = sum(a)
border = sum_a / (4*m)
kosu = 0
for i in a:
  if i >= border:
  	kosu += 1
if kosu >= m:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list(map(int,input().split()))
sum_a = sum(a)
border = sum_a / (4*m)
kosu = 0
for i in a:
  if i >= border:
  kosu += 1
if kosu >= m:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list(map(int,input().split()))
sum_a = sum(a)
border = sum_a / (4*m)
kosu = 0
for i in a:
  if i >= border
  kosu += 1
if kosu >= m:
  print('Yes')
else:
  print('No')
Problem p02730 (python)

Fixed submission:
s = input()
s_rev = s[::-1]
n = len(s)
##1つ目の条件
n1 = int((n-1)/2)
s1 = s[0:n1]
s1_rev = s1[::-1]
##2つめの条件
n2 = int((n+3)/2)
s2 = s[n2-1:n]
s2_rev = s2[::-1]
##判定
if s1 == s1_rev and s2 == s2_rev and s == s_rev:
    print('Yes') 
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)
##1つ目の条件
n1 = int((n-1)/2)
s1 = s[0:n1]
s_rev = s1[::-1]
 
##2つめの条件
n2 = int((n+3)/2)
s2 = s[n2-1:n]
s2_rev = s2[::-1]
 
##判定
if s1 == s_rev and s2 == s2_rev:
  print('Yes')
elif n =< 2:
  print('No')
else:
  print('No')
Problem p02801 (python)

Fixed submission:
c = input()
S = 'abcdefghijklmnopqrstuvwxyz'
f = S.find(c)
print (S[f+1])

Buggy submission (verdict: Runtime Error):
c = input()
S = 'abcdefghijklmnopqrstuvwxy'
f = S.find(c)
print (S[f+1])

Buggy submission (verdict: Runtime Error):
c = input()
S = 'abcdefghijklmnopqrstuwxy'
f = S.find(c)
print (S[f+1])
Problem p02812 (python)

Fixed submission:
n = int(input())
s = input()
print (s.count('ABC'))

Buggy submission (verdict: Runtime Error):
N = list(int(input())
S = list(input())
S.count('ABC')
Problem p03739 (python)

Fixed submission:
n=input()
a=[int(i) for i in input().split()]
def chk(a,t):
    ans=0
    x=0
    for i in a:
        x+=i
        if t==True and x<1:
            ans+=1-x
            x=1
        elif t==False and x>-1:
            ans+=x+1
            x=-1
        t=not t
    return ans
print(min(chk(a,True),chk(a,False)))

Buggy submission (verdict: Runtime Error):
n = input()
a = [int(i) for i in input().split()]
cou = len(a)
counter = 0
X = a[0]
ans = 0
for i in a:
    if X > 0:
        b = -1 - X
        ans += abs(b - a[i])
        X = -1
        counter += 1
        if counter == cou - 1:
            break
    else:
        b = 1 - X
        ans += abs(b - a[i])
        X = 1
        counter += 1
        if counter == cou - 1:
            break
print (ans)

Buggy submission (verdict: Runtime Error):
n = input()
a = [int(i) for i in input.split()]
X = 0
ans = 0
for i in a:
    X += i
    if X > 0:
        b = -1 - X
        ans += b - a[i+1]
    else:
        b = 1 - X
        ans += b - a[i+1]
print (ans)

Buggy submission (verdict: Runtime Error):
n = input()
a = [int(i) for i in input.split()]
X = 0
ans = 0
for i in a:
	X += i
    if X > 0:
      b = -1 - X
      ans += b - a(i+1)
    else X < 0:
      b = 1 - X
      ans += b - a(i+1)
    return ans
print (ans)

Buggy submission (verdict: Runtime Error):
n = input()
a = [int(i) for i in input.solit()]
X = 0
ans = 0
for i in a:
	X += i
    if X > 0:
      b = -1 - X
      ans += b - a(i+1)
    else X < 0:
      b = 1 - X
      ans += b - a(i+1)
    return ans
print (ans)