Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from collections import Counter

n=int(input())
v=list(map(int,input().split()))

even_counter=Counter(v[::2])
odd_counter=Counter(v[1::2])

even_counter_list = sorted(even_counter.items(), key=lambda x:x[1], reverse=True)
odd_counter_list = sorted(odd_counter.items(), key=lambda x:x[1], reverse=True)


if max(even_counter)!=max(odd_counter):
    print(n-even_counter[max(even_counter)]-odd_counter[max(odd_counter)])
else:
    if len(even_counter)!=1 and len(odd_counter)!=1:
        print(min(n-even_counter[even_counter_list[0,1]]-odd_counter[odd_counter_list[1,1]],n-even_counter[even_counter_list[1,1]]-odd_counter[odd_counter_list[0,1]]))
    elif len(even_counter)==1 and len(odd_counter)!=1:
        print(n-even_counter[max(even_counter)]-odd_counter[odd_counter_list[1,1]])
    elif len(even_counter)!=1 and len(odd_counter)==1:
        print(n-even_counter[even_counter_list[1,1]]-odd_counter[max(odd_counter)])
    else:
        print(n//2)


Fixed submission:
from collections import Counter

n=int(input())
v=list(map(int,input().split()))

e=Counter(v[::2]).most_common() + [(0,0)]
o=Counter(v[1::2]).most_common() + [(0,0)]


if e[0][0]!=o[0][0]:
    print(n-e[0][1]-o[0][1])
else:
    print(min(n-e[0][1]-o[1][1],n-e[1][1]-o[0][1]))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
x=list(map(int,input().split()))


for i in range(n):
    xi = x[:i]+x[i+1:]
    xi.sort()
    print(xi[n//2-1])


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

sort_x = sorted(x)

for i in range(n):
    if x[i]<=sort_x[n//2-1]:
        print(sort_x[n//2])
    else:
        print(sort_x[n//2-1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))

cnt=0
for i in range(n):
    if p[i]==i+1:
        p[i],p[i+1]=p[i+1],p[i]
        cnt+=1
print(cnt)


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

p.append(0)
cnt=0
for i in range(n):
    if p[i]==i+1:
        p[i],p[i+1]=p[i+1],p[i]
        cnt+=1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())

candidate = []
for i in range(m):
    a,b=map(int,input().split())
    if a==1:
        if b in candidate:
            print('POSSIBLE')
            exit()
        else:
            candidate.append(b)
    if b==n:
        if a in candidate:
            print('POSSIBLE')
            exit()
        else:
            candidate.append(a)
print('IMPOSSIBLE')


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

from_1=[]
to_n=[]
for i in range(m):
    a,b=map(int,input().split())
    if a==1:
        from_1.append(b)
    if b==n:
        to_n.append(a)

if len(set(from_1) & set(to_n)) >= 1:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

min=1000000000000000
for i in range(n-1):
    xy=abs(sum(a[:i+1])-sum(a[i+1:]))
    if xy < min:
        min=xy
print(min)


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

min=1000000000000000
left_sum=0
right_sum=sum(a)
for i in range(n-1):
    left_sum += a[i]
    right_sum -= a[i]
    xy=abs(left_sum-right_sum)
    if xy < min:
        min=xy
print(min)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

b=[]
for i in range(n):
    if i%2==0:
        b.append(a[i])
    else:
        b.insert(0, a[i])
if n%2!=0:
    b.reverse()
print(' '.join(map(str,b)))


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

odd = []
even = []
for i in range(n):
    if i%2==0:
        even.append(a[i])
    else:
        odd.append(a[i])
if n%2!=0:
    b=even[::-1]+odd
else:
    b=odd[::-1]+even

print(' '.join(map(str,b)))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

b=[]
for i in range(n):
    b.append(a[i])
    b.reverse()
print(' '.join(map(str,b)))


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

odd = []
even = []
for i in range(n):
    if i%2==0:
        even.append(a[i])
    else:
        odd.append(a[i])
if n%2!=0:
    b=even[::-1]+odd
else:
    b=odd[::-1]+even

print(' '.join(map(str,b)))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

b=[]
for i in range(n):
    b.append(a[i])
    b=b[::-1]
print(' '.join(map(str,b)))


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

odd = []
even = []
for i in range(n):
    if i%2==0:
        even.append(a[i])
    else:
        odd.append(a[i])
if n%2!=0:
    b=even[::-1]+odd
else:
    b=odd[::-1]+even

print(' '.join(map(str,b)))
Buggy python submission (verdict: Runtime Error):
input_list=list(input().split(" "))

#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if b <= 0:
  calc = input_list[0]
else:
  calc = input_list[0] - input_list[2]


Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=list(input().split(""))
 
T=list(input().split(""))
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=list(input().split(""))
 
T=list(input().split(""))
 
if S==T-(T-S):
  print("Yes")
else:
  print("No")


Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=input()
 
T=input()
 
if S==T-(T-S):
  print("Yes")
else:
  print("No")


Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=str(input())
 
T=str(input())
 
if S==T-(T-S):
  print("Yes")
else:
  print("No")


Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S=str(input())

T=str(input())

if S=T-(T-S):
  print("Yes")
else:
  print("No")

Fixed submission:
S=list(input())
 
T=list(input())
Judge = True 
 
for i in range(len(S)):
  if S[i]==T[i]:
    continue
  else:
    Judge = False

if Judge:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
input_list=list(input().split(" "))
#2000000000 0 0 2000000000
#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if b <= 0:
  calc = input_list[0]
else:
  calc = input_list[0] - input_list[2]
print(calc)

Fixed submission:
input_list=list(input().split(" "))
#2000000000 0 0 2000000000
#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if a < 0:
    calc = int(input_list[3])
elif b <= 0 and a >=0:
  calc = int(input_list[0])
else:
  calc = int(input_list[0]) - b
print(calc)

Buggy python submission (verdict: Runtime Error):
input_list=list(input())

#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if b <= 0:
  calc = input_list[0]
else:
  calc = input_list[0] - input_list[2]


Fixed submission:
input_list=list(input().split(" "))
#2000000000 0 0 2000000000
#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if a < 0:
    calc = int(input_list[3])
elif b <= 0 and a >=0:
  calc = int(input_list[0])
else:
  calc = int(input_list[0]) - b
print(calc)

Buggy python submission (verdict: Runtime Error):
input_list=list(input())

#A,B,C,K
a = int(list[3]) - int(list[0])
b = int(list[3]) - int(list[1])- int(list[0])
c = int(list[3]) - int(list[2])- int(list[1])- int(list[0])
if b <= 0:
  calc = list[0]
else:
  calc = list[0] - list[2]


Fixed submission:
input_list=list(input().split(" "))
#2000000000 0 0 2000000000
#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if a < 0:
    calc = int(input_list[3])
elif b <= 0 and a >=0:
  calc = int(input_list[0])
else:
  calc = int(input_list[0]) - b
print(calc)

Buggy python submission (verdict: Runtime Error):
input_list=list(input())

#A,B,C,K
a = int(list[3]) - int(list[0])
b = int(list[3]) - int(list[1])
c = int(list[3]) - int(list[2])

calc = 1 * a + 0 * b - 1 * c

print(calc)

Fixed submission:
input_list=list(input().split(" "))
#2000000000 0 0 2000000000
#A,B,C,K
a = int(input_list[3]) - int(input_list[0])
b = int(input_list[3]) - int(input_list[1])- int(input_list[0])
c = int(input_list[3]) - int(input_list[2])- int(input_list[1])- int(input_list[0])
if a < 0:
    calc = int(input_list[3])
elif b <= 0 and a >=0:
  calc = int(input_list[0])
else:
  calc = int(input_list[0]) - b
print(calc)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

if s + T[-1] == T: 
	print("Yes")
else:
	print("No")

Fixed submission:
S = input(); T = input()

if S + T[-1] == T:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
i = input()
a,b,c = map(int, i.split())

set = {}

set.add(a)
set.add(b)
set.add(c)

if len(s) == 2: 
  print("Yes")
else:
  print("No")

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

s = set()

s.add(a)
s.add(b)
s.add(c)

if len(s) == 2: 
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
H, A = input().split() 

import math

print(math.ceil(H/A))

Fixed submission:
H, A = map(int, input().split())

import math

print(math.ceil(H/A))
Buggy python submission (verdict: Runtime Error):
N = int(input())

intList = list(map(int, input().split()))
intList.sort()

cntList = [1] * (intList[-1] + 1)

i = 0
j = 1
ans = 0

while i < (N - 1):
  base = intList[i]
  j = 1
  num = base
  if cntList[num] == 1:
    while num < intList[-1]:
      if cntList[num] == 1:
        cntList[num] = 0
      j += 1
      num = base * j
    if intList[i] != intList[i+1]:
      ans += 1
  i += 1

if cntList[intList[-2]] == 1:
  ans += 1
  
print(ans)

Fixed submission:
N = int(input())

intList = list(map(int, input().split()))
intList.sort()

cntList = [1] * (intList[-1] + 1)

i = 0
j = 1
ans = 0

while i < (N - 1):
  base = intList[i]
  j = 1
  num = base
  if cntList[num] == 1:
    while num <= intList[-1]:
      if cntList[num] == 1:
        cntList[num] = 0
      j += 1
      num = base * j
    if intList[i] != intList[i+1]:
      ans += 1
  i += 1

if cntList[intList[-1]] == 1:
  ans += 1
  
print(ans)

Buggy python submission (verdict: Runtime Error):
import sys

N = int(input())

argv = input().split()
intList = [int(num) for num in argv]
intList.sort()

i = 0
j = 0
idel = 0

while i < N:
  j = i + 1
  while j < N:
    if (intList[j] % intList[i]) == 0:
      if (intList[j] == intList[i]):
        idel = 1
      del intList[j]
      N = N - 1
    else:
      j += 1
  if idel == 1:
    idel = 0
    del intList[i]
  i += 1

print(len(intList))

Fixed submission:
N = int(input())

intList = list(map(int, input().split()))
intList.sort()

cntList = [1] * (intList[-1] + 1)

i = 0
j = 1
ans = 0

while i < (N - 1):
  base = intList[i]
  j = 1
  num = base
  if cntList[num] == 1:
    while num <= intList[-1]:
      if cntList[num] == 1:
        cntList[num] = 0
      j += 1
      num = base * j
    if intList[i] != intList[i+1]:
      ans += 1
  i += 1

if cntList[intList[-1]] == 1:
  ans += 1
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

N = int(input())

argv = input().split()
divisible = 0
count = 0
  
for i in range(N):
  divisible = 0
  for j in range(N):
    if i == j:
      continue
    elif (int(argv[i]) % int(argv[j])) == 0:
      divisible = 1
      break
      
  if divisible == 0:
    count += 1
    
print(count)

Fixed submission:
N = int(input())

intList = list(map(int, input().split()))
intList.sort()

cntList = [1] * (intList[-1] + 1)

i = 0
j = 1
ans = 0

while i < (N - 1):
  base = intList[i]
  j = 1
  num = base
  if cntList[num] == 1:
    while num <= intList[-1]:
      if cntList[num] == 1:
        cntList[num] = 0
      j += 1
      num = base * j
    if intList[i] != intList[i+1]:
      ans += 1
  i += 1

if cntList[intList[-1]] == 1:
  ans += 1
  
print(ans)
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
if y>=2*x and y<=4*x and y%2==0:
  print("Yes")
else:
  print("No")

Fixed submission:
a = list(map(int,input().split()))
for i in range(5):
  if a[i]==0:
    print(i+1)
    break
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
if y>=2*x && y<=4*y:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y = map(int,input().split())
if y>=2*x and y<=4*x and y%2==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
while b[j] > K - a[i]:
    j -= 1
ans = max(ans, i + j)
print(ans)

Fixed submission:
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <string>
using namespace std;
int main()
{
    string s, t;
    cin >> s >> t;
    cout << t+s;
}

Fixed submission:
s, t = input("").split(" ")
res = t + s
print(res)
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include<string>
using namespace std;

int main()
{
    int n, a, b;
    cin >> n >> a >> b;
    if(n*a < b) {
        cout << n*a;
    } else {
        cout << b;
    }
}

Fixed submission:
n, a, b = [int(i) for i in input("").split(" ")]
if (n*a) < b:
  print(n*a)
else:
  print(b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
k = int(input())
s = input()
result = ''
for i in range(n):
    if i == k-1:
        result += chr(ord(s[i]) + 32)
    else:
        result += s[i]
print(result)

Fixed submission:
n, k = input().split()
a = int(n)
b = int(k)
s = input()
result = ''
for i in range(a):
    if i == b-1:
        result += chr(ord(s[i]) + 32)
    else:
        result += s[i]
print(result)
Buggy python submission (verdict: Runtime Error):
print(a + a ** 2 + a ** 3)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
N = int(input())
mark = 0

for i in range(1 , 10):
  for j in range(1 , 10):
    if(i * j == N):
      mark = 1
      break
      
if mark = 1:
  print("Yes")
else:
  print("No")

Fixed submission:
N = int(input())
mark = 0

for i in range(1 , 10):
  for j in range(1 , 10):
    if(i * j == N):
      mark = 1
      break
      
if mark == 1:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N = int(input())
mark = 0

for i in range(1 , 9):
  for j in range(1 , 9):
    if i * j == N:
      mark = 1
      break
      
if mark == 1:
  print("Yes")
else:
  print("No)
      

Fixed submission:
N = int(input())
mark = 0

for i in range(1 , 10):
  for j in range(1 , 10):
    if(i * j == N):
      mark = 1
      break
      
if mark == 1:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

for i in range(1 , 10 ** 6 + 1):
  for j in range(1 , 10 ** 6 + 1):
    if i * j == N:
      I = i - 1
      J = j - 1
      break
      
print(I + J)

Fixed submission:
import math

N = int(input())
n = math.sqrt(N)
ans = 10 ** 12

for i in range(1 , math.ceil(n) + 1):
  if i * (N // i) == N:
    count = (i - 1) + ((N // i) - 1)
    ans = min(ans , count)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

for i in range(1 , 10 ** 6 + 1):
  for j in range(1 , 10 ** 6 + 1):
    if i * j == N:
      I = i - 1
      J = j - 1
      break
      
print(I * J)

Fixed submission:
import math

N = int(input())
n = math.sqrt(N)
ans = 10 ** 12

for i in range(1 , math.ceil(n) + 1):
  if i * (N // i) == N:
    count = (i - 1) + ((N // i) - 1)
    ans = min(ans , count)
    
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = 2 * (volum_bottle - x) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degree(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degree(math.atan(L_t))
  
print(round(angle, 10))

Fixed submission:
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = (2 * (volum_bottle - x)) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degrees(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degrees(math.atan(L_t))
  
print(round(angle, 10))

Buggy python submission (verdict: Runtime Error):
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = (2 * volum_bottle) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degree(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degree(math.atan(L))
  
print(round(angle, 10))

Fixed submission:
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = (2 * (volum_bottle - x)) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degrees(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degrees(math.atan(L_t))
  
print(round(angle, 10))

Buggy python submission (verdict: Runtime Error):
a , b , x = map(int , input().split())

#1度傾けると何㎝水が進むか
angle_1 = b / 90

#水の高さ
l_water = b - ((a**2 * b) - x) / a ** 2

#残りの高さ
l_Remaining = b - l_water

#角度
angle = l_Remaining / angle_l

print(angle)

Fixed submission:
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = (2 * (volum_bottle - x)) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degrees(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degrees(math.atan(L_t))
  
print(round(angle, 10))
Buggy python submission (verdict: Runtime Error):
n = int(input())
print(a+a**2+a**3)

Fixed submission:
n = int(input())
print(n+n**2+n**3)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
for index, i in enumerate(A):
    #print("index:{}".format(index))
    for j in range(index + 1):
        if i > A[j]:
            #print("break:{}".format(j))
            break
        elif index == j or A[j] == 1:
            ans += 1
            break

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = 0
small = 0


for index, i in enumerate(A):
    if index == 0:
        ans += 1
        small = i


    elif small >= i:
        ans += 1
        small = i      

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 0
cnt = 0
for index, i in enumerate(A):
    #print("index:{}".format(index))
    for j in range(index + 1):
        if i > A[j]:
            #print("break:{}".format(j))
            break
        elif index == j:
            ans += 1
            break
        #print("j:{}".format(j))




print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = 0
small = 0


for index, i in enumerate(A):
    if index == 0:
        ans += 1
        small = i


    elif small >= i:
        ans += 1
        small = i      

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())
K = int(input())

target = S[K]
S = list(S)

for i in range(N):
   if S[i] == target:
       pass
   else:
       S[i] = "*"
        
S = "".join(S)
print(S)

Fixed submission:
N = int(input())
S = str(input())
K = int(input())

target = S[K-1]
S = list(S)

for i in range(N):
   if S[i] == target:
       pass
   else:
       S[i] = "*"
        
S = "".join(S)
print(S)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
K = int(input())

target = S[K]
S = list(S)

for i in range(N):
   if S[i] == target:
       pass
   else:
       S[i] = "*"
        
S = "".join(S)
print(S)

Fixed submission:
N = int(input())
S = str(input())
K = int(input())

target = S[K-1]
S = list(S)

for i in range(N):
   if S[i] == target:
       pass
   else:
       S[i] = "*"
        
S = "".join(S)
print(S)
Buggy python submission (verdict: Runtime Error):
if x[0] == sum(x) / len(x):
    print("Yes")
else:
    print("No")

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

if x[0] == sum(x) / len(x):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A, B = int(input().split())
if A*B % 2 == 0:
  print("Even")
else:
  print("Odd")
    


Fixed submission:
A, B = map(int, input().split())
if A*B % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
import math
from functools import reduce
G = []
for a in range(K):
    for b in range(K):
        for c in range(K):
            g = reduce(math.gcd,[a+1,b+1,c+1])
            G.append(g)
print(sum(G))

Fixed submission:
K = int(input())
import math
from functools import reduce
G = []
for a in range(1,K+1):
    for b in range(1,K+1):
        g = math.gcd(a,b)
        for c in range(1,K+1):
            gc = math.gcd(g,c)
            G.append(gc)
print(sum(G))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
k = 0
for i in range(N-1):
    if A[i]/sum(A) > 1/(4*M):
        k = k+1

if k >= M:
    print('Yes')
else:
    peint('No')

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
k = 0
for i in range(N):
    if A[i]/sum(A) >= 1/(4*M):
        k = k+1

if k >= M:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
S = input()
if S[2]==S[3] and S[4]=S[5]:
    print('Yes')
else:
    print('No')

Fixed submission:
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
if S[2]==S[3] and S[4]=S[5]:
    print('Yes')
else:
    print('No')

Fixed submission:
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
if S[3]==S[4] and S[5]=S[6]:
    print('Yes')
else:
    print('No')

Fixed submission:
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
X = input()

y = X//500
z = X%500
a = z//5 

A = 1000*y+5*a
print(a)

Fixed submission:
X = input()
X = int(X)
y = X//500
z = X%500
a = z//5 

A = 1000*y+5*a
print(A)