Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
ans = 0
while True:
    n = len(s)
    if n <= 1:
        print(ans)
        exit()
    for i in range(n-1):
        if s[i] != s[i+1]:
            del s[i:i+2]
            ans += 2
            break
        if i == n-2:
            print(ans)
            exit()


Fixed submission:
from collections import Counter
s = list(input())
s = Counter(s)
print(min(s['0'], s['1']) * 2)

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
ans = 0
while True:
    n = len(s)
    if n <= 1:
        print(ans)
        exit()
    for i in range(n-1):
        if s[i] != s[i+1]:
            del s[i]
            del s[i]
            ans += 2
            break
        if i == n-2:
            print(ans)
            exit()


Fixed submission:
from collections import Counter
s = list(input())
s = Counter(s)
print(min(s['0'], s['1']) * 2)
Buggy python submission (verdict: Runtime Error):
n, t = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ct = [i[0] for i in ct if i[1]<=t]
print(min(ct))

Fixed submission:
n, t = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ct = [i[0] for i in ct if i[1]<=t]
if not ct:
    print('TLE')
else:
    print(min(ct))
Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(int,input().split())
if x1==x2:
    print(x2+(y1-y2), y2, x1+(y1-y2), y1)
else:
    print(x2, y2+(x1-x2), x1, y1y2+(x1-x2))

Fixed submission:
x1, y1, x2, y2 = map(int,input().split())

print(x2-(y2-y1), y2+(x2-x1), x1-(y2-y1), y1+(x2-x1))
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dx[d]<w and 0<=j+dy[d]<h:
                    count += 1 if field[i+dx[d]][j+dy[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')


Fixed submission:
h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [0, 1, 0, -1]
dy = [-1, 0, 1, 0]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dy[d]<h and 0<=j+dx[d]<w:
                    count += 1 if field[i+dy[d]][j+dx[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
from operator import itemgetter
n = int(input())
x = list(map(int, input().split()))

idx = [i for i in range(n)]
c = zip(x, idx)
c = sorted(c,key=itemgetter(0))
x, idx = zip(*c)

medi1 = x[len(x)//2]
medi2 = x[len(x)//2-1]

for i in range(len(x)):
    if idx.index(i)<len(x)//2:
        print(medi1)
    else:
        print(medi2)

Fixed submission:
from operator import itemgetter
n = int(input())
x = list(map(int, input().split()))

x = [(j, i) for i, j in enumerate(x)]
x.sort(key=itemgetter(0))
medi1 = x[len(x)//2][0]
medi2 = x[len(x)//2-1][0]
ans = [0]*n
for i in range(len(x)):
    if i<len(x)//2:
        ans[x[i][1]] = medi1
    else:
        ans[x[i][1]] = medi2

for a in ans:
    print(a)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())

for i in range(a, b+1):
    if i<=a+k-1 or b-k+1<=i:
        print(i)


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

for i in range(a, b+1):
    if i<=a+k-1 or b-k+1<=i:
        print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))
i=0
ans =0

while i<n:
    if p[i]==i+1:
        ans += 1
        i+=1
    if not (i==n-2 and p[i+1]==i+2):
        i += 1
print(ans)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
i=0
ans =0
while i<n-1:
    if p[i]==i+1:
        p[i], p[i+1] = p[i+1], p[i]
        ans += 1
    i+=1
if p[n-1]==n:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
a = [list(x) for x in a.items() if x[1]>=2]
a.sort(reverse=True, key=lambda x: (x[0], x[1]))
count = 0
base = 4
for i in len(a):
    if count == 1:
        print(l*a[i][0])
        exit()
    else:
        l = a[0]
        count += 1

    if a[1]>=4:
        print(a[i][0]*a[i][0])
        exit()

print(0)


Fixed submission:
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
a = [list(x) for x in a.items() if x[1]>=2]
a.sort(reverse=True, key=lambda x: (x[0], x[1]))
count = 0
base = 4
for i in range(len(a)):
    if count == 1:
        print(l*a[i][0])
        exit()
    else:
        l = a[i][0]
        count += 1

    if a[i][1]>=4:
        print(a[i][0]*a[i][0])
        exit()

print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = float('inf')
for i in range(n-1):
    ans = min(abs(sum(a[:i+1])-sum(a[i+1:])), ans)
print(ans)

Fixed submission:
from collections import deque
n = int(input())
a = deque(list(map(int, input().split())))
ans = float('inf')
total = sum(a)
sm = 0
while len(a)>1:
    sm += a.pop()
    ans = min(abs(2*sm-total), ans)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 1
for i in range(1,n+1):
    ans *= i
print(ans%1000000007)

Fixed submission:
n = int(input())
ans = 1
for i in range(1,n+1):
    ans = (ans*i)%1000000007
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = [[] for _ in range(N)]

for _ in range(M):
    a, b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

count = 0

def dfs(i, now, done):
    global count
    if i == N-1:
        count += 1
        return

    for j in ab[now]:
        if j not in done:
            dfs(i+1, j, done + [j])
    return

dfs(0, 0, [0])
print(count)


Fixed submission:
A, B = map(int, input().split())
if A==B:
    print('Draw')
elif A==1:
    print('Alice')
elif B==1:
    print('Bob')
elif A>B:
    print('Alice')
else:
    print('Bob')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = [[] for _ in range(M)]

for _ in range(M):
    a, b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

count = 0

def dfs(i, now, done):
    global count
    if i == N-1:
        count += 1
        return

    for j in ab[now]:
        if j not in done:
            dfs(i+1, j, done + [j])
    return

dfs(0, 0, [0])
print(count)


Fixed submission:
import itertools

n, m = map(int, input().split())

path = [[False] * n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

ans = 0

for i in itertools.permutations(range(n), n):#N!
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j + 1]]:
                break

print(ans)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
ab = [[] for _ in range(M)]

for _ in range(M):
    a, b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

count = 0

def dfs(i, now, done):
    global count
    if i == N-1:
        count += 1
        return

    for j in ab[now]:
        if j not in done:
            dfs(i+1, j, done + [j])
    return

dfs(0, 0, [0])
print(count)

Fixed submission:
import itertools

n, m = map(int, input().split())

path = [[False] * n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

ans = 0

for i in itertools.permutations(range(n), n):#N!
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j + 1]]:
                break

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())

ans = 0
for i in range(0,k+1):
    for j in range(0,k+1):
        for t in range(0, k+1):
            if i+j+t == s:
                ans += 1
print(ans)


Fixed submission:
from bisect import bisect
k, s = map(int, input().split())
ans = 0
rekkyo = []
for i in range(0,k+1):
    for j in range(0,k+1):
        if 0<=s-i-j<=k:
            ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int, input().split()))
ans = 0
m = 10 ** 9 + 7

for i in range(n):
    for j in range(i + 1, n):
        ans += a_list[i] * a_list[j]
        ans %= m

print(ans)


Fixed submission:
n = int(input())
a_list = list(map(int, input().split()))
sum_a = sum(a_list)
ans = 0
m = 10 ** 9 + 7

for i in range(n):
    sum_a -= a_list[i]
    ans += a_list[i] * sum_a
    ans %= m

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
h, w, m =  map(int, input().split())
bom_list = []
h_list = [0] * h
w_list = [0] * w

for i in range(m):
    a, b =  map(int, input().split())
    bom_list.append([a - 1, b - 1])
    h_list[a - 1] += 1
    w_list[b - 1] += 1

max_h = max(h_list)
max_h_list = [i for i, x in enumerate(h_list) if x == max_h]
max_w = max(w_list)
max_w_list = [i for i, x in enumerate(w_list) if x == max_w]
ans = max_h + max_w
count = 0

for i in range(len(max_h_list)):
    for j in range(len(max_w_list)):
        if [max_h_list[i], max_w_list[j]] in bom_list:
            count += 1

if len(max_h_list) * len(max_w_list) == count:
    ans -= 1

print(ans)


Fixed submission:
h, w, m =  map(int, input().split())
bom_list = []
h_list = [0] * h
w_list = [0] * w

for i in range(m):
    a, b =  map(int, input().split())
    bom_list.append([a - 1, b - 1])
    h_list[a - 1] += 1
    w_list[b - 1] += 1

max_h = max(h_list)
max_w = max(w_list)
ans = max_h + max_w
count = 0

for bom in bom_list:
    if h_list[bom[0]] == max_h and w_list[bom[1]] == max_w:
        count += 1

if h_list.count(max_h) * w_list.count(max_w) == count:
    ans -= 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
m = 0

if n[-1] == "1":
    m = 7
elif n[-1] == "3":
    m = 9
elif n[-1] == "7":
    m = 1
elif n[-1] == "9":
    m = 3
else:
    print(-1)
    exit()

n = int(n)

for i in range(1, k):
    if len(set(list(str(n * m)))) == 1:
        break
    m = int(str(i) + str(m)[-1])
    if len(str(n * m)) >= k:
        print(-1)
        exit()

print(len(str(n * m)))


Fixed submission:
k = int(input())
m = 0

for i in range(k):
    m = (m * 10 + 7) % k
    if m == 0:
        break
    elif i == k - 1:
        print(-1)
        exit()

print(i + 1)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
prev = 1

for i in range(n - k + 1):
    score = 1
    for j in range(k):
        score *= a_list[i + j]
    if i != 0:
        if prev < score:
            print("Yes")
        else:
            print("No")
    prev = score


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

for i in range(n - k):
    if a_list[i] < a_list[i + k]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = [0] * n

for i in range(1, n):
    for j in range(1, n):
        for k in range(1, n):
            fn = i * i + j * j + k * k + i * j + j * k + k * i
            if fn > n:
                break
            ans[fn - 1] += 1

for i in range(n):
    print(ans[i])


Fixed submission:
import math

n = int(input())
ans = [0] * n

for i in range(1, int(math.sqrt(n))):
    for j in range(1, i + 1):
        for k in range(1, j + 1):
            fn = i * i + j * j + k * k + i * j + j * k + k * i
            if fn > n:
                break
            if i != j and j != k and k != i:
                ans[fn - 1] += 6
            elif i == j and j == k:
                ans[fn - 1] += 1
            else:
                ans[fn - 1] += 3

for i in range(n):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int, input().split()))
ans = 1

for i in range(n):
    ans *= a_list[i]

if ans > 10 ** 18:
    print(-1)
else:
    print(ans)


Fixed submission:
n = int(input())
a_list = list(map(int, input().split()))
ans = 1

if 0 in a_list:
    print(0)
    exit()

for i in range(n):
    ans *= a_list[i]
    if len(str(ans)) > 19 or ans > 10 ** 18:
        print(-1)
        exit()

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

a, b = map(float, input().split())
a = int(a)
b = int(b * 100)
ans = str(a * b)

print(int(ans[:-2]))


Fixed submission:
import math

a, b = map(str, input().split())
a = int(a)
b = int(b.replace('.', ''))
ans = str(a * b)

if len(ans) > 2:
    print(int(ans[:-2]))
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
road = []
ans = [0] * n
prev = [1]

for i in range(m):
    a, b =  map(int, input().split())
    road.append([a, b])

while 0 in ans[1:]:
    next = []
    for i in range(len(prev)):
        for j in range(len(road)):
            if road[j][0] == prev[i] and ans[road[j][1] - 1] == 0:
                ans[road[j][1] - 1] = prev[i]
                next.append(road[j][1])
            elif road[j][1] == prev[i] and ans[road[j][0] - 1] == 0:
                ans[road[j][0] - 1] = prev[i]
                next.append(road[j][0])
    prev = next
    
print('Yes')
for i in range(1, len(ans)):
    print(ans[i])


Fixed submission:
n, m = map(int, input().split())
edge_list = [[] for i in range(n)]
prev_list = [1]
ans = [0] * n

for i in range(m):
    a, b =  map(int, input().split())
    edge_list[a - 1].append(b)
    edge_list[b - 1].append(a)

while len(prev_list) > 0:
    next = []
    for prev in prev_list:
        for edge in edge_list[prev - 1]:
            if ans[edge - 1] == 0:
                next.append(edge)
                ans[edge - 1] = prev
    prev_list = next

print('Yes')
for i in range(1, len(ans)):
    print(ans[i])
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
h_list = list(map(int, input().split()))
road_list = [[''] * n for i in range(n)]
ans = 0

for i in range(m):
    a, b = map(int, input().split())
    road_list[a - 1][b - 1] = 'x'
    road_list[b - 1][a - 1] = 'x'

for i in range(n):
    if 'x' not in road_list[i]:
        ans += 1
        continue
    numx = 0
    numh = 0
    for j in range(n):
        if road_list[i][j] == 'x':
            numx += 1
            if h_list[i] > h_list[j]:
                numh += 1
        if j == n - 1 and numx == numh:
            ans += 1

print(ans)


Fixed submission:
n, m = map(int, input().split())
h_list = list(map(int, input().split()))
n_list = [''] * n
ans = 0

for i in range(m):
    a, b = map(int, input().split())
    if h_list[b - 1] >= h_list[a - 1]:
        n_list[a - 1] = 'x'
    if h_list[a - 1] >= h_list[b - 1]:
        n_list[b - 1] = 'x'

for i in range(n):
    if n_list[i] == '':
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, n = map(int, input().split())
ans = 0

for i in range(1, n + 1):
    num = (a * i) // b - a * (i // b)
    if ans < num:
        ans = num

print(ans)


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

if b > n:
    x = n
else:
    x = b - 1

print((a * x) // b)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()[::-1]
d = 1
num = 0
ans = 0
mod_list = [0] * 2019
mod_list[0] = 1

for char in s:
    num += int(char) * d
    mod_list[num % 2019] += 1
    d *= 10

for i in range(2019):
    ans += mod_list[i] * (mod_list[i] - 1) //2

print(ans)


Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy python submission (verdict: Runtime Error):
s = input()[::-1]
d = 1
num = 0
mod_list = [0] * 2019

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = mod_list[0]
for cnt in range(1, 2019):
    ans += mod_list[cnt] * (mod_list[cnt] - 1) // 2

print(ans)


Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
n = len(s)
mod_list = [0] * 2019

for i in range(n):
    num = int(''.join(s[n - i - 1:n])) % 2019
    mod_list[num] += 1

ans = mod_list[0]
for cnt in range(1, 2019):
    ans += mod_list[cnt] * (mod_list[cnt] - 1) // 2

print(ans)


Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
answer = 0

for i in range(4, len(s)):
    for j in range(0, len(s) - i):
        num = int(''.join(s[j:(i + j + 1)]))
        if num % 2019 == 0:
            answer += 1

print(answer)


Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy python submission (verdict: Time Limit Exceeded):
s = list(input())
answer = 0

for i in range(3, len(s)):
    for j in range(0, len(s) - i):
        num = int(''.join(s[j:(i + j + 1)]))
        if num % 2019 == 0:
            answer += 1

print(answer)


Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力
Buggy python submission (verdict: Runtime Error):
n = int(input())
sum = 0

for i in range(1, n + 1):
    if i % 3 != 0 && i % 5 != 0:
        sum += i

print(sum)


Fixed submission:
n = int(input())
sum = 0
for i in range(1, n+1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
import math

k = int(input())
sum = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum += math.gcd(c, math.gcd(a, b))
print(sum)


Fixed submission:
from math import gcd

k = int(input())
sum = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum += gcd(c, gcd(a, b))
print(sum)

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

k = int(input())
sum = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum += math.gcd(a, math.gcd(b, c))
print(sum)


Fixed submission:
from math import gcd

k = int(input())
sum = 0

for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            sum += gcd(c, gcd(a, b))
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s_list = list(str(input()))
r = 0
g = 0
b = 0

for i in range(n):
    if s_list[i] == 'R':
        r += 1
    elif s_list[i] == 'G':
        g += 1
    else:
        b += 1

ans = r * g * b

for d in range(1, n):
    for i in range(n):
        if i + 2 * d < n and \
            s_list[i] != s_list[i + d] and \
            s_list[i] != s_list[i + 2 * d] and \
            s_list[i + d] != s_list[i + 2 * d]:
            ans -= 1

print(ans)


Fixed submission:
n = int(input())
s_list = list(str(input()))
r = 0
g = 0
b = 0

for i in range(n):
    if s_list[i] == 'R':
        r += 1
    elif s_list[i] == 'G':
        g += 1
    else:
        b += 1

ans = r * g * b

for d in range(1, n):
    for i in range(n):
        if i + 2 * d >= n:
            break
        if s_list[i] != s_list[i + d] and \
            s_list[i] != s_list[i + 2 * d] and \
            s_list[i + d] != s_list[i + 2 * d]:
            ans -= 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s_list = list(str(input()))
ans = 0

for i in range(n):
    for j in range(i + 1, n):
        if s_list[i] == s_list[j]:
            continue
        else:
            for k in range(j + 1, n):
                if s_list[i] != s_list[k] and s_list[j] != s_list[k] and j - i != k - j:
                    ans += 1
print(ans)


Fixed submission:
n = int(input())
s_list = list(str(input()))
r = 0
g = 0
b = 0

for i in range(n):
    if s_list[i] == 'R':
        r += 1
    elif s_list[i] == 'G':
        g += 1
    else:
        b += 1

ans = r * g * b

for d in range(1, n):
    for i in range(n):
        if i + 2 * d >= n:
            break
        if s_list[i] != s_list[i + d] and \
            s_list[i] != s_list[i + 2 * d] and \
            s_list[i + d] != s_list[i + 2 * d]:
            ans -= 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
num_list = ['X'] * n

def ans():
    if n == 1 and m == 0:
        return 0
    for i in range(m):
        set = list(map(str, input().split()))
        if set[0] == '1' and set[1] == '0' and n != 1:
            return -1
        else:
            if num_list[int(set[0]) - 1] == 'X':
                num_list[int(set[0]) - 1] = set[1]
            elif num_list[int(set[0]) - 1] == set[1]:
                continue
            else:
                return -1

    for i in range(n):
        if num_list[i] == 'X':
            num_list[i] = '1' if i == 0 else '0'

    return ''.join(num_list)

print(ans())


Fixed submission:
import math
n = int(input())
print(math.ceil(n/2))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
index = 0
value = 0

for i in range(n - k):
    if p_list[i] < p_list[i + k]:
        index = i + 1

for i in range(k):
    value += (1 + p_list[index + i])/ 2 

print(value)


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

if len(set(a_list)) == n:
    print('YES')
else:
    print('NO')