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

Fixed submission:
n = int(input())
lst = [0]*n
for i in range(n):
    s = input()
    lst[i] = s

lst_af = sorted(lst)

word = lst_af[0]
most_lst = []
most_lst.append(word)
max_num = 1
cnt = 1

for i in range(1, n):
    now_word = lst_af[i]
    if now_word == word:
        cnt += 1
    else:
        cnt = 1
    if max_num == cnt:
        most_lst.append(now_word)
    if max_num < cnt:
        most_lst = []
        most_lst.append(now_word)
        max_num = cnt
    word = now_word

for x in most_lst:
    print(x)

Buggy submission (verdict: Runtime Error):
from itertools import Counter
n = int(input())
lst = [0]*n
for i in range(n):
    s = input()
    lst[i] = s

c = Counter(lst)
max_num = max(c.values())
most_lst = sorted([k for k, v in c.items() if v == max_num])
for x in most_lst:
    print(x)
Problem p02987 (python)

Fixed submission:
s = input()
ans = []
for i in range(4):
    ans.append(s[i])

ans.sort()
print('Yes' if ans[0] == ans[1] and ans[2] == ans[3] and ans[0] != ans[2] else 'No')

Buggy submission (verdict: Runtime Error):
s = input()
ans = []
for i in range(4):
    ans.append(s[i])

ans.sort()
print('Yes' if ans[0] == ans[1] and ans[2] == ans[3] ans ans[0] != ans[2] else 'No')
Problem p02627 (python)

Fixed submission:
a = input()
if a in "abcdefghijklmnopqrstuvwxyz":
    print("a")
else:
    print("A")

Buggy submission (verdict: Runtime Error):
a = input()
if a in "abcdefghijklmnopqrstuvwxyz":
    print("a")
else
    print("A")
Problem p02595 (python)

Fixed submission:
import math
N, D = list(map(int, input().split()))
XY = [list(map(int, input().split())) for _ in range(N)]

res = 0
for i in XY:
    if math.sqrt(i[0] ** 2 + i[1] ** 2) <= D:
        res += 1

print(res)

Buggy submission (verdict: Runtime Error):
import numpy as np
N, D = list(map(int, input().split()))
XY = [list(map(int, input().split())) for _ in range(N)]

res = 0
for i in XY:
    if np.sqrt(XY[i][0] ** 2 + XY[i][1] ** 2) <= D:
        res += 1

print(res)
Problem p02688 (python)

Fixed submission:
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(a)
    
    
ans=total-len(set(sunuke))
 
print(ans)

Buggy submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
    
ans=total-len(set(sunuke))
 
print(ans)

Buggy submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
    
ans=total-len(set(sunuke))

print(sunuke)

Buggy submission (verdict: Runtime Error):
total,okasi=map(int,input().split())
sunuke=[]

for i in range(okasi):
  di=int(input)
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
print(total-len(set(sunuke)))
Problem p02689 (python)

Fixed submission:
N,M=map(int,input().split())
H=list(map(int,input().split()))
check=[0]*N
for i in range(M):
  A,B=map(int,input().split())
  if H[A-1]>H[B-1]:
    check[B-1]=check[B-1]+1
  elif H[A-1]<H[B-1]:
    check[A-1]=check[A-1]+1
  else:
      check[A-1]+=1
      check[B-1]+=1
    
    
ans=check.count(0)

print(ans)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
H=list(map(int,input().split())
check=[0]*N
for i in range(M):
  A,B=map(int,input().split())
  if H[A-1]>H[B-1]:
    check[B-1]=check[B-1]+1
  elif H[A-1]<H[B-1]:
    check[A-1]=check[A-1]+1
  else:
      check[A-1]+=1
      check[B-1]+=1
    
    
ans=check.count(0)

print(ans)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
H=list(map(int,input().split))
check=[0]*N
for i in range(M):
  A,B=map(int,input.split)
  if H[A-1]>H[B-1]:
    check[B-1]=check[B-1]+1
  elif H[A-1]<H[B-1]:
    check[A-1]=check[A-1]+1
  else:
      check[A-1]+=1
      check[B-1]+=1
    
    
ans=check.count(0)

print(ans)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
H=list(map(int,input().split))
check=[0]*N
for i in range(M):
  A,B=map(int,input.split)
  if H[A-1]>H[B-1]:
    check[A-1]=check[A-1]+1
    check[B-1]=check[B-1]-1
  elif H[A-1]<H[B-1]:
    check[A-1]=check[A-1]-1
    check[B-1]=check[B-1]+1
    
    
ans=check.count()

print(ans)

Buggy submission (verdict: Runtime Error):
total_tenb,total_load=map(int,input().split())

import copy
a=list(map(int,input().split()))
hight=copy.copy(a)
good_tenb=copy.copy(a)

  
def kuraberu(A,B):
  if hight[A-1]>hight[B-1]:
    good_tenb.append(height[A-1])
    good_tenb.pop(height[B-1])
  elif hight[A-1]<hight[B-1]:
    good_tenb.append(hight[B-1])
    good_tenb.pop(hight[A-1])
    
  
for h in range(total_load):
  A,B=map(int,input().split())
  kuraberu(A,B)
  
  
print(len(set(good_tenb)))

Buggy submission (verdict: Runtime Error):
total_tenb,total_load=map(int,input().split())
hight=[]
good_tenb=[]
for i in range(total_tenb):
  a=int(input())
  hight.append(a)
  good_tenb.append(a)
  
def kuraberu(A,B):
  if hight[A]>hight[B]:
    good_tenb.append(height[A])
    good_tenb.pop(height[B])
  elif hight[A]<hight[B]:
    good_tenb.append(hight[B])
    good_tenb.pop(hight[A])
    
  
for h in range(total_load):
  A[h]=int(input())
  B[h]=int(input())
  kuraberu(A[h],B[h])
  
  
print(len(set(good_tenb)))

Buggy submission (verdict: Runtime Error):
total_tenb,total_load=map(int,input().split())
hight=[]
good_tenb=[]
for i in range(total_tenb):
  a=int(input())
  hight.append(a)
  good_tenb.append(a)
  
def kuraberu(A,B):
  if hight[A]>hight[B]:
    good_tenb.append(height[A])
    good_tenb.del(height[B])
  elif hight[A]<hight[B]:
    good_tenb.append(hight[B])
    good_tenb.del(hight[A])
    
  
for h in range(total_load):
  A[h]=int(input())
  B[h]=int(input())
  kuraberu(A[h],B[h])
  
  
print(len(set(good_tenb)))
Problem p02693 (python)

Fixed submission:
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B+1):
    if i % K ==0:
       a=1
        
if a==0:
  print("NG")
    
else:
  print("OK")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
flag=0    
for i in range(A,B,1):
    if i % K ==0:
       a=1 
        
if a==0:
   print("NG")
    
    
else:
  print("OK")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
       a+=1
       break 
        
elif a==0:
   print("NG")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
        a+=1
       break 
        
if a==0:
   print("NG")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
a=0    
for i in range(A,B,1):
    if i % K ==0:
       print("OK")
        a+=1
       break 
        
elif a==0:
   print("NG")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
flag=False
a=0
while flag:
    
    for i in range(A,B,1):
        if i % K ==0:
            print("OK")
            a+=1
            flag=True
            break
        else:    

    if flag:
        break
        
if a==0:
  print("NG")
Problem p02699 (python)

Fixed submission:
s,w=map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
s,w=int(input()),int(input())
if w>=s:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
s=input()
w=input()
ss=int(s)
ww=int(w)
if ww>=ss:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
if W>=S:
  print("unsafe")
else:
  print("safe")
Problem p02701 (python)

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
  
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
N=int(input())
glist=[]
for i in range(N):
  glist.append(input())

print(lens(glist))

Buggy submission (verdict: Runtime Error):
N=int(input())
list=[]
for i in N:
  list.append(input())
  
print(len(list))

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
for i in range(N):
  s.append(input())
  
print(len(set(s)))
Problem p02689 (python)

Fixed submission:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n,m =I2()
    h = Intl()
    l = [[] for i in range(n)]
    cnt = 0
    for i in range(m):
        a,b = I2()
        l[a-1].append(b)
        l[b-1].append(a)
    #print(l)
    for i in range(n):
        if len(l[i]) == 0:
            cnt +=1
            continue
        #print(cnt)
        for j in l[i]:
            if h[i] > h[j-1]:
                f = True
            else:
                f = False
                break
        if f:cnt += 1
    print(cnt)

Buggy submission (verdict: Runtime Error):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n,m =I2()
    h = Intl()
    l = [[] for i in range(n)]
    cnt = 0
    for i in range(m):
        a,b = I2()
        l[a-1].append(b)
        l[b-1].append(a)
    for i in range(n):
        if len(l[i]) == 0:cnt +=1
        for j in l[i]:
            if h[i] > h[j-1]:
                f = True
            else:
                f = False
                break
        if f:cnt += 1
    print(cnt)

Buggy submission (verdict: Runtime Error):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    n,m =I2()
    h = Intl()
    l = [[] for i in range(n)]
    cnt = 0
    for i in range(m):
        a,b = I2()
        l[a-1].append(b)
        l[b-1].append(a)
    for i in range(n):
        if len(l[i]) == 0:cnt +=1
        for j in l[i]:
            if h[i] > h[j-1]:
                f = True
            else:
                f = False
        if f:cnt += 1
    print(cnt)
Problem p02695 (python)

Fixed submission:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
n,m,q = I2()
r = []
a = [0]*q
b = [0]*q
c = [0]*q
d = [0]*q
ans = []
import copy
def dfs(A):
    if len(A) == n+1:
        now = 0
        for i in range(q):
            if A[b[i]]-A[a[i]] == c[i]:now += d[i]
        ans.append(now)
        return
    A.append(A[-1])
    while (A[-1] <= m):
        dfs(copy.copy(A))
        A[-1] += 1
if __name__ == "__main__":
    for i in range(q):
        a[i],b[i],c[i],d[i] = I2()
    dfs([1])
    print(max(ans))

Buggy submission (verdict: Runtime Error):
4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 3 78537
3 4 2 8580
1 2 1 96263
1 4 2 2156
1 2 0 94325
1 4 3 94328
Problem p02754 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n, a, b = i2()

if a == 0:
    print(0)
elif b == 0:
    print(n)
else:
    cnt = n // (a+b)
    c = n % (a+b)
    if c <= a:
        print(a*cnt+c)
    else:
        print(a*cnt+c-(c-a))

Buggy submission (verdict: Runtime Error):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n, a, b = i2()
if a == 0 and b == 0:
    print(0):
elif a == 0:
    print(0)
elif b == 0:
    print(n)
else:
    cnt = n // (a+b)
    c = n%(a+b)
    if c <= a:
        print(a*cnt+c)
    else:
        print(a*cnt+c-b)
Problem p02759 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass

n = i()
print(n//2 if n%2==0 else n//2+1)

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n ,m = i2()
l = [0]*n
for i in range(m):
    s,c = i2()
    if l[s-1] == 0 or l[s-1] == c:
        l[s-1] = c
    else:
        print(-1)
        exit()
num = ""
for i in l:
    num = num + str(i)
num = int(num)
print(num if len(str(num)) == n else -1)
Problem p02771 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a = intl()
a = list(set(a))
if len(a) == 2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = [input() for _ in range(n)]
s.sort()
ss = list(set(s))
ss.sort()
a = [0]*len(ss)
i = 0
j = 0
while n-1 > i:
    if s[i] == s[i+1]:
        a[j] += 1
        i += 1
    else:
        i += 1
        j += 1
m = max(a)
for k in range(len(a)):
    if m == a[k]:
        print(ss[k])

Buggy submission (verdict: Runtime Error):
import sys
import math
import itertools as it
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
s = [input() for _ in range(n)]
s.sort()
ss = list(set(s))
ss.sort()
a = [0]*len(ss)
i = 0
while n-1 > i:
    if s[i] == s[i+1]:
        a[ss.index(s[i])] += 1
        i += 1
    else:
        i += 1
m = max(a)
for k in range(len(a)):
    if a[k] == m:
        print(ss[k])
Problem p02777 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
l = input().split()
s,t = l[0],l[1]
a ,b = i2()
u = input()
if s == u:
    print(a-1,b)
else:
    print(a,b-1)

Buggy submission (verdict: Runtime Error):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n ,k = i2()
p = intl()
def sx(n):
    return (n+1)/2

m = 0
pnt = 0
for i in range(0,n-k+1):
    s = sum(p[i:i+k])
    if s > m:
        m = s
        pnt = i
cnt = 0
for j in range(pnt,pnt+k):
    cnt += sx(p[j])
print(cnt)
Problem p02779 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
a = intl()
a = list(set(a))
if len(a) == n:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(k) for k in input().split()]
b=0
for j in range(n):
    for k in range(n):
        if a[j]==a[k] and j!=k:
        b+=1
        break
    break
if b==0:
  print('YES')
else:
  print('NO')
Problem p02832 (python)

Fixed submission:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
cnt = 0
if not 1 in a:
    print(-1)
    exit()
now = 1
for i in range(n):
    if now == a[i]:
        now += 1
    else:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

n = I()
a = Intl()
cnt = 0
a = a[::-1]
now = a[0]
#print(now,a)
for i in range(1,n):
    if a[i] >= now:
        cnt += 1
    else if now-1 == a[i]:
        now = a[i]
    else:
        cnt += 1
print(cnt if now == 1 else -1)
Problem p02836 (python)

Fixed submission:
s = list(input())
if len(s)%2 == 0:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2:]
else:
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2+1:]
#print(s1,s2)
i = 0
j = -1
cnt = 0
while len(s1) > i:
    if s1[i] != s2[j]:
        cnt += 1
    i += 1
    j -= 1
print(cnt)

Buggy submission (verdict: Runtime Error):
s = input()
print(len(list(set(s)))-len(s)//2 if len(s)%2 == 0 else len(list(set(s))-len(s)//2+1)
Problem p02933 (python)

Fixed submission:
n = int(input())
s = input()
print(s if n >= 3200 else "red")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
print(s if s >= 3200 else "red")
Problem p03041 (python)

Fixed submission:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n,k = i2()
s = l()
s[k-1] = s[k-1].lower()
for k in s:
    print(k,end="")

Buggy submission (verdict: Runtime Error):
s = [int(k) for k in list(input())]
s1 = 10*int(s[0])+int(s[1])
s2 = 10*int(s[2])+int(s[3])
if s2 == 0 and s1 > 12:
    print("NA")
elif s1 > 12 and s2 <= 12:
    print("YYMM")
elif s1 <= 12 and s2 > 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Buggy submission (verdict: Runtime Error):
s = [int(k) for k in list(input())]
s1 = 10*int(s[0])+int(s[1])
s2 = 10*int(s[2])+int(s[3])
if s2 == 0:
    print("NA")
elif s1 <= 12 and s2 <= 12:
    print("AMBIGUOUS")
elif s1 <= 12 and s2 >= 12:
    print("MMYY") 
else:
    print("YYMM")
Problem p02688 (python)

Fixed submission:
n, k = map(int, input().split())
snukes = [0] * n
for _ in range(k):
  d = int(input())
  a = map(int, input().split())
  for i in a:
    snukes[i - 1] += 1
 
print(snukes.count(0))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
snukes = [0] * n
for _ in range(k):
  d = int(input())
  a = map(int, input().split())
  for i in a:
    snukes[i] += 1

print(snukes.count(0))
Problem p02831 (python)

Fixed submission:
A,B=map(int,input().split())
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def lcm(a,b):
    return a*b//gcd(a,b)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
import math
A,B=map(int,input().split())
print(A*B//math.gcd(A,B))