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

Fixed submission:

S = input()

S = [s for s in S]
S = [int(s, 0) for s in S]
S.sort()
if 1 in S and  0 in S:
    print(min(S.count(0)*2,S.count(1)*2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):

S = input()

S = [s for s in S]

ans = 0
while len(S) > 0:
    counter = 0
    for ix in range(len(S)):
        if ix+1 < len(S):
            if S[ix] != S[ix+1]:
                del S[ix]
                del S[ix]
                ans += 1
                counter += 1
                break

            if S[ix] == S[ix+1] and S[ix+1] == S[ix+2]:
                del S[ix+1]
    if counter == 0:
        break

print(ans*2)

Buggy submission (verdict: Runtime Error):

S = input()

S = [s for s in S]

ans = 0
while len(S) > 0:
    counter = 0
    for ix in range(len(S)):
        if ix+1 < len(S):
            if S[ix] != S[ix+1]:
                del S[ix]
                del S[ix]
                ans += 1
                counter += 1
                break

            if S[ix] == S[ix+1] and S[ix+1] == S[ix+2]:
                del S[ix+1]
    if counter == 0:
        break

print(ans*2)

Buggy submission (verdict: Runtime Error):

S = input()

S = [s for s in S]

ans = 0
while len(S) > 0:
    counter = 0
    for ix in range(len(S)):
        if ix+1 < len(S):
            if S[ix] != S[ix+1]:
                print(S)
                del S[ix]
                del S[ix]
                ans += 1
                counter += 1
                break
    if counter == 0:
        break

print(ans*2)

Buggy submission (verdict: Runtime Error):

S = input()

S = [s for s in S]

ans = 0
while len(S) > 0:
    counter = 0
    for ix in range(len(S)):
        if ix+1 < len(S):
            if S[ix] != S[ix+1]:
                print(S)
                del S[ix]
                del S[ix]
                ans += 1
                counter += 1
    if counter == 0:
        break

print(ans*2)
Problem p03137 (python)

Fixed submission:
n, m = map(int, input().split())
x = list(map(int, input().split()))

if n >= len(x):
    print(0)
    exit()

ls = []
x.sort()

for i in range(m-1):
    diff = x[i+1] - x[i]
    ls.append(diff)

ls.sort(reverse=True)
ans = sum(ls)

for i in range(n-1):
    ans -= ls[i]

print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = list(map(int, input().split()))
 
if n >= len(x):
    print(0)
    exit()
l = []
x.sort()
 
for i in range(m-1):
    diff = x[i+1] - x[i]
    ls.append(diff)
l.sort(reverse=True)
ans = sum(ls)
 
for i in range(n-1):
    ans -= ls[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
x = list(map(int, input().split()))
 
if n >= len(x):
    print(0)
    exit()

l = []
x.sort()
 
for i in range(m-1):
    diff = x[i+1] - x[i]
    ls.append(diff)

l.sort(reverse=True)
ans = sum(ls)
 
for i in range(n-1):
    ans -= ls[i]
print(ans)
Problem p03077 (python)

Fixed submission:
from math import ceil


def main(N, A, B, C, D, E):
    loads = [A, B, C, D, E]
    min_val = min(loads)
    min_index = loads.index(min_val)

    res = min_index + ceil(N / min_val) + (5 - (min_index + 1))

    return res


if __name__ == "__main__":
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    print(main(N, A, B, C, D, E))

Buggy submission (verdict: Runtime Error):
from math import ceil


def main(N, A, B, C, D, E):
    loads = [A, B, C, D, E]
    min_val = min(loads)
    min_index = loads.index(min_val)

    res = min_index + ceil(N / min_val) + (5 - (min_index + 1))

    return res


if __name__ == "__main__":
    N = input()
    A = input()
    B = input()
    C = input()
    D = input()
    E = input()
    print(main(N, A, B, C, D, E))
Problem p02860 (python)

Fixed submission:
n = input()
s = raw_input()
if(n%2==1):
	print "No"
else:
	if(s[0:n/2]==s[n/2:n]):
		print "Yes"
	else:
  		print "No"

Buggy submission (verdict: Runtime Error):
n = input()
s = raw_input()
if(n%2==1):
 	print "No"
else:
	if(s[0:n/2]==s[n/2:n]):
		print "Yes"
  	else:
    	print "No"
Problem p02578 (python)

Fixed submission:
def main():
  N = int(input())
  A = list(map(int,input().split()))
  ans = 0
  for i in range(1,N):
    sub = A[i-1] - A[i]
    if sub > 0:
      A[i]+=sub
      ans+=sub
  print(ans)
  return
main()

Buggy submission (verdict: Runtime Error):
def main():
  N = int(input())
  A = list(map(int,input().split()))
  ans = 0
  for i in range(1,N):
    sub = A[i-1] - A[i]
    if sub > 0:
      A[i]+=sub
      ans+=sub
  print(sub)
  return
main()

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(1,N):
  sub = A[i-1] - A[i]
  if sub > 0:
    ans+=sub
print(sub)
Problem p02773 (python)

Fixed submission:
N = int(input())
hashmap = {}
Array = [[] for _ in range(N+1)]
for _ in range(N):
  st = input()
  if st not in hashmap:
    hashmap[st] = 0
  hashmap[st]+=1
max_num = max(hashmap.values())
tup = []
for k,v in hashmap.items():
  if v == max_num:
    tup.append(k)
tup.sort()
for i in tup:
  print(i)

Buggy submission (verdict: Runtime Error):
N = int(input())
hashmap = {}
Array = [[] for _ in range(N+1)]
for _ range(N):
  st = input()
  if st not in hashmap:
    hashmap[st] = 0
  hashmap[st]+=1
max_num = max(hashmap.values())
hashmap.sort()
for k,v in hashmap.items():
  if v == max_num:
    print(k)
Problem p02779 (python)

Fixed submission:
def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return
main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    List = list(map(int,input(),split()))
    Set = set()
    for i in List:
      if i in Set:
        print('No')
        return
      Set.add(i)
	print('Yes')
main()
Problem p02835 (python)

Fixed submission:
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

A,B,C = map(int,readline().rstrip().split())
if (A+B+C) <=21:
    print("win")
else:
    print("bust")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
tes = [[-1]*N for i in range(N)]
for i in range(N):
    A = int(readline())
    for j in range(A):
        x,y = map(int,readline().rstrip().split())
        tes[i][x-1] = y

cnt = 0
for i in range(2**N):
    hon = [0]*N
    for j in range(N):
        if (i>>j)&1:
            hon[j] = 1
    flag = True
    for j in range(N):
        if hon[j]:
            for k in range(N):
                if tes[j][k] != hon[k]:
                    flag = False
                    break
        if not flag:
            break
    if flag:
        cnt = max(cnt,hon.count(1))
print(cnt)
Problem p03250 (python)

Fixed submission:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)
 
a,b,c = sorted(map(int,readline().split()))
print (10 * c  + b + a)

Buggy submission (verdict: Runtime Error):
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

a,b,c = sorted(map(int,readline().split()))
print (10 * c  + b + a)
Problem p02948 (python)

Fixed submission:
import bisect
import time
import heapq


# N: バイトの種類
# M: 日数の最大
N,M = map(int,input().split(" "))

# A 日数
# b バイト代
A = []
B = []
for _ in range(N):
    a,b = map(int,input().split(" "))
    A.append(a)
    B.append(-b)

# 日数でソート
ind_sorted = sorted(range(N), key = lambda x:A[x])
tmp_a = 0
tmp_b_ls = [0]
money = 0
tmp_ind = 0
for i in range(N):
    if A[ind_sorted[i]] > M:
        break
    if tmp_a != A[ind_sorted[i]]:
        # 空いている日数
        # print(d)
        # print(tmp_b_ls)
        d = A[ind_sorted[i]]-tmp_a
        for _ in range(d):
            if tmp_b_ls == []:
                break
            money -= heapq.heappop(tmp_b_ls)
        tmp_a = A[ind_sorted[i]]
    heapq.heappush(tmp_b_ls,B[ind_sorted[i]])

d = M+1-tmp_a
# print(d)
# print(tmp_b_ls)

for _ in range(d):
    if tmp_b_ls == []:
        break
    money -= heapq.heappop(tmp_b_ls)
print(money)

Buggy submission (verdict: Runtime Error):
import bisect
import time
import heapq


# N: バイトの種類
# M: 日数の最大
N,M = map(int,input().split(" "))

# A 日数
# b バイト代
A = []
B = []
for _ in range(N):
    a,b = map(int,input().split(" "))
    A.append(a)
    B.append(-b)

# 日数でソート
ind_sorted = sorted(range(N), key = lambda x:A[x])
tmp_a = 0
tmp_b_ls = [0]
money = 0
tmp_ind = 0
for i in range(N):
    if A[ind_sorted[i]] > M:
        break
    if tmp_a != A[ind_sorted[i]]:
        # 空いている日数
        print(d)
        print(tmp_b_ls)
        d = A[ind_sorted[i]]-tmp_a
        for _ in range(d):
            if tmp_b_ls == []:
                break
            money -= heapq.heappop(tmp_b_ls)
        tmp_a = A[ind_sorted[i]]
    heapq.heappush(tmp_b_ls,B[ind_sorted[i]])

d = M+1-tmp_a
print(d)
print(tmp_b_ls)

for _ in range(d):
    if tmp_b_ls == []:
        break
    money -= heapq.heappop(tmp_b_ls)
print(money)

Buggy submission (verdict: Runtime Error):
import bisect
import time


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


A = []
B = []
for _ in range(N):
    a,b = map(int,input().split(" "))
    A.append(a)
    B.append(b)

# 日数でソート
ind_sorted = sorted(range(N), key = lambda x:A[x])

tmp_a = 0
tmp_b_ls = [0]
money = 0
tmp_ind = 0
for i in range(N):
    if A[ind_sorted[i]] > M:
        break
    if tmp_a != A[ind_sorted[i]]:
        d = A[ind_sorted[i]]-tmp_a
        tmp_money = sum(tmp_b_ls[-d:])
        money += tmp_money
        # 最大値以外を取り除く
        tmp_b_ls = tmp_b_ls[max(0,(M-1)-(len(tmp_b_ls)-d)):-d]
        tmp_a = A[ind_sorted[i]]
    bisect.insort(tmp_b_ls[],B[ind_sorted[i]])

d = M+1-tmp_a
tmp_money = sum(tmp_b_ls[-d:])
money += tmp_money

print(money)
Problem p02951 (python)

Fixed submission:

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

if C+B > A:
    d = (C+B)-A
else:
    d = 0

print(d)

Buggy submission (verdict: Runtime Error):

import numpy as np
from scipy import signal

N = int(input())
H = list(map(int, input().split(" ")))

H = np.array(H)

ans = 'Yes'
min_ind = signal.argrelmin(H)[0]
tmp_ind = 0
for ind in min_ind:
    
    if H[tmp_ind:ind].max() > H[ind]+1:
        ans = 'No'
        break
    tmp_ind = ind

if H[tmp_ind:-1].max() > H[-1]+1:
    ans = 'No'

print(ans)

Buggy submission (verdict: Runtime Error):

import numpy as np
from scipy import signal

N = int(input())
H = list(map(int, input().split(" ")))

H = np.array(H)

ans = 'Yes'
min_ind = signal.argrelmin(H)[0]
tmp_ind = 0
for ind in min_ind:
    
    if H[tmp_ind:ind].max() > H[ind]+1:
        ans = 'No'
        break
    tmp_ind = ind

if H[tmp_ind:ind].max() > H[-1]+1:
    ans = 'No'

print(ans)
Problem p02959 (python)

Fixed submission:

import numpy as np
N = int(input())

A_ls = np.array(list(map(int,input().split(" "))))
B_ls = np.array(list(map(int,input().split(" "))))

S = 0

for i,b in enumerate(B_ls):
    if b > A_ls[i]:
        b -= A_ls[i]
        S += A_ls[i]
        if A_ls[i+1] >= b:
            A_ls[i+1] -=b
            S+=b
        else:
            S+=A_ls[i+1]
            A_ls[i+1] = 0 
    else:
        S += b

print(S)

Buggy submission (verdict: Runtime Error):

import numpy as np
N = int(input())

A_ls = np.array(list(map(int,input().split(" "))))
B_ls = np.array(list(map(int,input().split(" "))))

S = 0

for i,b in enumerate(B_ls):
    if b > A_ls[i]:
        b -= A_ls[i]
        S += A_ls[i]
        if A_ls[i+1] >= b:
            A_ls[i+1] -=b
            S+=b
        else:
            S+=A_ls[i+1]
            A_ls[i+1] = 0 
    else:
        S += b

print(S)

Buggy submission (verdict: Runtime Error):

import numpy as np
N = int(input())

A_ls = np.array(list(map(int,input().split(" "))))
B_ls = np.array(list(map(int,input().split(" "))))

S = 0

for i,b in B_ls:
    if b > A_ls[i]:
        A_ls[i] == 0
        b -= A_ls[i]
        S += A_ls[i]
        if A_ls[i+1] >= b:
            A_ls[i+1] -=b
            S+=b
        else:
            A_ls[i+1] = 0
            S+=(A_ls[i+1])
    else:
        S += b

print(S)

Buggy submission (verdict: Runtime Error):

import numpy as np
N = int(input())

A_ls = np.array(list(map(int,input().split(" "))))
B_ls = np.array(list(map(int,input().split(" "))))

S = 0

for i,a in A_ls:
    if a > B_ls[i]:
        B_ls[i] == 0
        a -= B_ls[i]
        S += B_ls[i]
        if B_ls[i+1] >= a:
            B_ls[i+1] -=a
            S+=a
        elif:
            B_ls[i+1] = 0
            S+=(B_ls[i+1])
    elif:
        S += a

print(S)
Problem p02624 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(1, N+1):
  j = N // i
  ans += j * (j + 1) * i // 2
print(ans)

Buggy submission (verdict: Runtime Error):
from math import sqrt as s

N = int(input())

if N == 1: print(1)
else:
  total = 1
  for i in range(2, N+1):
    count = 0
    for j in range(1, int(s(i))+1):
      if i % j == 0: count += 1
    if s(i) % 1 == 0: count = count * 2 - 1
    else: count *= 2
    total += i * count

print(total)
Problem p02912 (python)

Fixed submission:
from bisect import bisect_left as bs
#ソート順序を保ったまま値を挿入する
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

while M > 0:
  i = A.pop(-1) // 2
  A.insert(bs(A, i), i)
  M -= 1

print(sum(A))

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
A = list(map(lambda x: int(x) * (-1), input().split()))
heapq.heapify(A)

for _ in range(M):
  tmp_min = heapq.heappop(A)
  heapq.heappush(A, (-1) * (-tmp_min // 2))

print(-sum(A))
Problem p03045 (python)

Fixed submission:
class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]


def main():
    N, M = map(int, input().split())

    uf = UnionFind(N)
    for _ in range(M):
        x, y, z = map(int, input().split())
        uf.union(x-1, y-1)

    for i in range(N):
        uf.find(i)
    # print(uf.par)
    s = set(uf.par)
    print(len(s))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
class UnionFindTree:
    """Tested https://atc001.contest.atcoder.jp/tasks/unionfind_a
    """

    def __init__(self, size: int):
        self.size = size

        # all are root at first
        self._par = [i for i in range(size)]

    def find(self, x: int) -> int:
        if self._par[x] == x:  # root
            return x
        else:
            self._par[x] = self.find(self._par[x])  # path compression
            return self._par[x]

    def same(self, x: int, y: int) -> bool:
        return self.find(x) == self.find(y)

    def union(self, x: int, y: int):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self._par[x] = y


def main():
    N, M = map(int, input().split())

    tree = UnionFindTree(N)
    for _ in range(M):
        x, y, z = map(int, input().split())
        tree.union(x-1, y-1)

    for i in range(N):
        tree.find(i)
    s = set(tree._par)
    print(len(s))


if __name__ == '__main__':
    main()
Problem p02763 (python)

Fixed submission:
#  --*-coding:utf-8-*--

import bisect

N = int(input())
indexess = [[] for _ in range(26)]

S = list(input())
for i, s in enumerate(S):
    indexess[ord(s) - 97].append(i)


Q = int(input())
for _ in range(Q):
    q1,q2, q3 = input().split()
    q2 = int(q2)

    if q1 == '1':
        s0 = S[q2-1]
        if s0 != q3:
            S[q2-1] = q3
            
            indexes = indexess[ord(s0) - 97]
            del indexes[bisect.bisect_left(indexes, q2-1)]
            bisect.insort(indexess[ord(q3) - 97], q2-1)

    else:
        cnt = 0
        q3 = int(q3)
        for indexes in indexess:
            
            if bisect.bisect_left(indexes, q2-1) < bisect.bisect_right(indexes, q3-1):
                cnt += 1

        print(cnt)

Buggy submission (verdict: Runtime Error):
#  --*-coding:utf-8-*--

import bisect

N = int(input())
indexess = [[] for _ in range(26)]

S = list(input())
for i, s in enumerate(S):
    indexess[ord(s) - 97].append(i)


Q = int(input())
for _ in range(Q):
    q1,q2, q3 = input().split()
    q2 = int(q2)

    if q1 == '1':
        s0 = S[q2-1]
        if s0 != q3:
            S[q2-1] = q3
            
            indexes = indexess[ord(s0) - 97]
            del indexes[bisect.bisect_left(indexes, q2-1)+1]
            bisect.insort(indexess[ord(q3) - 97], q2-1)

    else:
        cnt = 0
        q3 = int(q3)
        for indexes in indexess:
            
            if bisect.bisect_left(indexes, q2-1) < bisect.bisect_right(indexes, q3-1):
                cnt += 1

        print(cnt)
Problem p02897 (python)

Fixed submission:
#  --*-coding:utf-8-*--

def main():
    N = int(input())

    print('{:.10f}'.format(((N+1)//2)/N))


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
MAX = 10**8+1
N, M = map(int, input().split())

X = [MAX]*(2**N)
X[0] = 0

for i in range(M):
    a, b = map(int, input().split())
    k = sum(1<<(c-1) for c in map(int, input().split()))

    for j, x in enumerate(X):
        if X[j|k] > x + a:
            X[j|k] = x + a

print(X[-1] if X[-1] < MAX else -1)
Problem p03201 (python)

Fixed submission:
#  --*-coding:utf-8-*--



def main():
    N = int(input())
    A = list(map(int, input().split()))

    M = int(10**9)
    bitOfM = M.bit_length()

    X = {}
    Y = [set() for _ in range(bitOfM+1)]

    for a in A:
        if not a in X:
            X[a] = 1
            Y[a.bit_length()].add(a)
        else:
            X[a] += 1

    c = 0

    for i in range(bitOfM, 0, -1):
        P = 1<<(i-1)
        
        if P in X:
            c += X[P]//2

        for a in Y[i]:
            if a == P:
                continue

            a2 = 2*P - a
            if a2 in X:
                c2 = min(X[a], X[a2])
                c += c2
                X[a2] -= c2


    print(c)



if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#  --*-coding:utf-8-*--



def main():
    N = int(input())
    A = list(map(int, input().split()))

    M = 2*10**5
    X = [0]*(M+1)

    for a in A:
        X[a] += 1

    c = 0

    for i in range(17, -1, -1):
        r1 = 1<<i
        r2 = r1*2

        c2 = X[r1]//2
        c += c2
        X[r1] -= c2*2        

        for j in range(r1+1, min(r2-1, M)+1):
            j2 = r2-j

            c2 = min(X[j], X[j2])
            c += c2
            
            X[j] -= c2
            X[j2] -= c2

    print(c)



if __name__ == '__main__':
    main()
Problem p02829 (python)

Fixed submission:
a=int(input())
b=int(input())
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break
Problem p02831 (python)

Fixed submission:
def gcd(x, y):
# choose the smaller number
    if x > y:
        smaller = y
    else:
        smaller = x
    for i in range(1, smaller+1):
        if((x % i == 0) and (y % i == 0)):
            hcf = i 
    return hcf
a,b=input().strip().split(" ")
a,b=[int(a),int(b)]
c=gcd(a,b)
d=a*b
ans=d//c
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
a,b=input().strip().split(" ")
a,b=[int(a),int(b)]
c=gcd(a,b)
d=a*b
ans=d//c
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
a,b=input().strip().split(" ")
a,b=[int(a),int(b)]
c=gcd(a,b)
d=a*b
ans=d//c
print(ans)
Problem p02836 (python)

Fixed submission:
a=input().strip()
x=len(a)
x1=x//2
c=0
for i in range(x1):
  if a[i]!=a[x-1-i]:
    c+=1
    
print(c)

Buggy submission (verdict: Runtime Error):
a=input().strip()
x=len(a)
c=0
for i in range(x+1):
  if a[i]!=a[x-1-i]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
a=input().strip()
x=len(a)
c=0
for i in range(x+1):
  if a[i]!=a[n-1-i]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
a=input().strip()
x=len(a)
c=0
for i in range((x//2)+1):
  if a[i]!=a[n-1-i]:
    c+=1
print(c)
a=input().strip()

Buggy submission (verdict: Runtime Error):
a=input().strip()
x=len(a)
c=0
for i in range(x+1):
  if a[i]!=a[n-1-i]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
a=input()
x=len(a)
c=0
if x%2:
  for i in range(x+1):
    if a[i]!=a[n-i-1]:
      c+=1
else:
  for i in range(x):
    if a[i]!=a[n-i-1]:
      c+=1
print(c)
Problem p02659 (python)

Fixed submission:
a, b = input().split()
a = int(a)
b = int(b[0] + b[2:])
print(a*b//100)

Buggy submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b = b[0] + b[2:]
print(a*b//100)

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

Fixed submission:
N = int(input())
d = {}
for i in range(N):
    d[input()] = 0
print(len(d))

Buggy submission (verdict: Runtime Error):
N = int(input())
d = {}
for i in range(N):
  d[input()] = 0
print(len(dict))