Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
    lst = map(int, input().split())
    print('Yes' if len(set(lst)) >= 2 else 'No')

Fixed submission:
lst = list(map(int, input().split()))
print('Yes' if len(set(lst)) == 2 else 'No')

Buggy python submission (verdict: Runtime Error):
lst = map(int, input().split())
print('Yes' if set(len(lst)) >= 2 else 'No')

Fixed submission:
lst = list(map(int, input().split()))
print('Yes' if len(set(lst)) == 2 else 'No')
Buggy python 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)

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 python submission (verdict: Time Limit Exceeded):
import itertools
n =  int(input())
L = list(map(int, input().split()))
L_conv = list(itertools.combinations(L, 3))
cnt = 0
for i in L_conv:
    tmp = sorted(i, reverse = True)
    if sum(tmp) > tmp[0] * 2:
        cnt += 1

print(cnt)

Fixed submission:
import bisect

n = int(input())
l = list(map(int, input().split()))
list.sort(l)
cnt = 0

for i in range(n - 1):
    for j in range(i + 1, n):
        a = l[i]
        b = l[j]
        a_b = a + b
        insert_index = bisect.bisect_left(l, a_b)
        cnt += insert_index - (j + 1)

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = [input() for _ in range(N)]

for i in range(len(S)):
    a = sorted(S[i])
    S[i] = ''.join(a)

S_unq = set(S)
num_list = []

for i in S_unq:
    num = S.count(i)
    num_list.append(num)

dup_list = [i for i in num_list if i > 1]
dup_num = 0
for i in dup_list:
    b = (i * (i - 1)) / 2
    dup_num += b

print(int(dup_num))


Fixed submission:
N = int(input())
strs = []
for i in range(N):
    s = list(input())
    s.sort()
    strs.append(''.join(s))

d = dict.fromkeys(strs, 0)
for s in strs:
    if s in d.keys():
        d[s] += 1
    else:
        d.setdefault(s, 1)

ans = 0
for v in d.values():
    ans += (v * (v - 1)) / 2

print(int(ans))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = [input() for _ in range(N)]

for i in range(len(S)):
    a = sorted(S[i])
    S[i] = ''.join(a)

S_unq = set(S)
num_list = []

for i in S_unq:
    num = S.count(i)
    num_list.append(num)

dup_list = [i for i in num_list if i > 1]
dup_num = 0
for i in dup_list:
    b = (i * (i - 1)) / 2
    dup_num += b

print(int(dup_num))

Fixed submission:
N = int(input())
strs = []
for i in range(N):
    s = list(input())
    s.sort()
    strs.append(''.join(s))

d = dict.fromkeys(strs, 0)
for s in strs:
    if s in d.keys():
        d[s] += 1
    else:
        d.setdefault(s, 1)

ans = 0
for v in d.values():
    ans += (v * (v - 1)) / 2

print(int(ans))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(map(int, input().split()))
l = sort(s)
cnt = 0
for i in range(len(s)):
    if s[i] != l[i]:
        cnt += 1

print('NO' if cnt > 2 else 'YES')

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
l = sorted(s)
cnt = 0
for i in range(len(s)):
    if s[i] != l[i]:
        cnt += 1

print('NO' if cnt > 2 else 'YES')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = [int(input()) for _ in range(n)]
if n == 2:
    print(A[1])
    print(A[0])    
else:
    for i in range(n):
        if i == 0:
            print(max(A[1 : ]))
        elif i == n - 1:
            print(max(A[ : n]))
        else:
            a = max(A[ : i])
            b = max(A[i + 1 : ])
            print(max(a, b))

Fixed submission:
n = int(input())
A = [int(input()) for _ in range(n)]
semi_max_num, max_num = sorted(A)[-2:]
for a in A:
    if a != max_num:
        print(max_num)
    else:
        print(semi_max_num)
Buggy python 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')

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 python submission (verdict: Runtime Error):
X, A = map(int, input().split())
if X < A:
    print(str(0)
else:
    print(str(10))


Fixed submission:
X, A = map(int, input().split())
if X < A:
    print(str(0))
else:
    print(str(10))
Buggy python submission (verdict: Runtime Error):
n , x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 0
s = 0
for i in range(l):
    s += i
    if s <= x:
        cnt += 1
    else:
        break

print(cnt)

Fixed submission:
n , x = map(int, input().split())
l = list(map(int, input().split()))
tmp = [0] * (n + 1)
sum = 0
for i in range(n):
    sum += l[i]
    tmp[i + 1] = sum 

cnt = 0
for i in range(len(tmp)):
    if tmp[i] <= x:
        cnt += 1

print(cnt)

Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int,input().split()))
D=0

for i in range(N):
    D = D + L[i]
    if D > X:
        a = i
        break

print(str(a+1))

Fixed submission:
n , x = map(int, input().split())
l = list(map(int, input().split()))
tmp = [0] * (n + 1)
sum = 0
for i in range(n):
    sum += l[i]
    tmp[i + 1] = sum 

cnt = 0
for i in range(len(tmp)):
    if tmp[i] <= x:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
l, r = map(int, input().split())
tmp_l = [i for i in range(l, r + 1)]
tmp_set = set(tmp_l)
for _ in range(m - 1):
    l, r = map(int, input().split())
    tmp_l = [i for i in range(l, r + 1)]
    tmp_set = tmp_set.intersection(set(tmp_l))
 
print(len(tmp_set))

Fixed submission:
n, m = map(int, input().split())
l_lst = [0] * m
r_lst = [0] * m
for i in range(m):
    l, r = map(int, input().split())
    l_lst[i] = l
    r_lst[i] = r

if max(l_lst) <= min(r_lst):
    print(min(r_lst) - max(l_lst) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
l, r = map(int, input().split())
tmp_l = [i for i in range(l, r + 1)]
tmp_set = set(tmp_l)
for _ in range(m - 1):
    l, r = map(int, input().split())
    tmp_l = [i for i in range(l, r + 1)]
    tmp_set = tmp_set.intersection(set(tmp_l))

print(len(tmp_set))

Fixed submission:
n, m = map(int, input().split())
l_lst = [0] * m
r_lst = [0] * m
for i in range(m):
    l, r = map(int, input().split())
    l_lst[i] = l
    r_lst[i] = r

if max(l_lst) <= min(r_lst):
    print(min(r_lst) - max(l_lst) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int,input().split())
L = [0] * M
R = [0] * M
for i in range(M):
    L[i], R[i] = map(int, input().split())

skylist = []
for i in range(M):
    key = list(range(L[i], R[i] + 1))
    skylist.append(key)

for i in range(M):
    if M != 1:
        nice_key = list(set(skylist[0])&set(skylist[1]))
        try:
            nice_key = list(set(nice_key)&set(skylist[i+1]))
        except:
            last_key = list(set(nice_key)&set(skylist[-1]))
    elif M ==1:
            last_key = skylist[0][::]

print(len(last_key))


Fixed submission:
n, m = map(int, input().split())
l_lst = [0] * m
r_lst = [0] * m
for i in range(m):
    l, r = map(int, input().split())
    l_lst[i] = l
    r_lst[i] = r

if max(l_lst) <= min(r_lst):
    print(min(r_lst) - max(l_lst) + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int,input().split())
L = [0] * M
R = [0] * M
for i in range(M):
    L[i], R[i] = map(int, input().split())

skylist = []
for i in range(M):
    key = list(range(L[i], R[i] + 1))
    skylist.append(key)

for i in range(M):
    if M != 1:
        nice_key = list(set(skylist[0])&set(skylist[1]))
        if i != M-1:
            nice_key = list(set(nice_key)&set(skylist[i+1]))
        else:
            last_key = list(set(nice_key)&set(skylist[-1]))
    elif M ==1:
        last_key = skylist[0][::]

print(len(last_key))




Fixed submission:
n, m = map(int, input().split())
l_lst = [0] * m
r_lst = [0] * m
for i in range(m):
    l, r = map(int, input().split())
    l_lst[i] = l
    r_lst[i] = r

if max(l_lst) <= min(r_lst):
    print(min(r_lst) - max(l_lst) + 1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [-1 * x for x in a]
heapq.heapify(a)
for _ in range(m):
    b, c = map(int, input().split())
    for i in range(b):
        heapq.heappush(a, -1 * c)

ans = 0
for i in range(n):
    ans += -1 * heapq.heappop(a)

print(ans)

Fixed submission:
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
heapq.heapify(a)
lst = []
for _ in range(m):
    b, c = map(int, input().split())
    lst.append((b, c))

lst = sorted(lst, key = lambda x: -x[1])
flag = False
for b, c in lst:
    for _ in range(b):
        min_num = heapq.heappop(a)
        if min_num < c:
            heapq.heappush(a, c)
        else:
            heapq.heappush(a, min_num)
            flag = True
            break
    if flag:
        break

print(sum(a))
Buggy python submission (verdict: Runtime Error):
A, B, T = int(input().split())

i = int((T + 0.5) // A)

print(int(B * i))



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

i = int((T + 0.5) // A)

print(int(B * i))

Buggy python submission (verdict: Runtime Error):
A = int(input())

B = int(input())

T = int(input())

i = int((T + 0.5) // A)

print(int(B * i))




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

i = int((T + 0.5) // A)

print(int(B * i))

Buggy python submission (verdict: Runtime Error):
A = int(input())
T = int(input())
i = int((T + 0.5)/A)
biscuit = A * i

print(biscuit)

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

i = int((T + 0.5) // A)

print(int(B * i))
Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
lst = [0] * q
for i in range(q):
    l, r = map(int, input().split())
    lst[i] = (l, r)

cum = [0] * (n + 1)
for i in range(n):
    cum[i + 1] = cum[i]
    if s[i] == 'A' and s[i + 1] == 'C':
        cum[i + 1] += 1

for x in lst:
    print(cum[x[1]-1] - cum[x[0]-1])

Fixed submission:
n, q = map(int, input().split())
s = input()
lst = [0] * q
for i in range(q):
    l, r = map(int, input().split())
    lst[i] = (l, r)

cum = [0] * (n + 1)
for i in range(n):
    cum[i + 1] = cum[i]
    if i < n - 1 and s[i] == 'A' and s[i + 1] == 'C':
        cum[i + 1] += 1

for x in lst:
    print(cum[x[1]-1] - cum[x[0]-1])
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int, input().split()))
def chmin(a, b):
    if a > b:
        return b
    else:
        return a

dp = [float('inf')] * n
dp[0] = 0
for i in range(1, n):
    for j in range(1, min(k+1, i+1)):
        dp[i] = chmin(dp[i], dp[i-j] + abs(h[i] - h[i-j]))

print(dp[n-1])

Fixed submission:
n, k = map(int, input().split())
h = list(map(int, input().split()))
def chmin(a, b):
    if a > b:
        return b
    else:
        return a

dp = [float('inf')] * n
dp[0] = 0
for i in range(1, n):
    for j in range(1, min(k+1, i+1)):
        dp[i] = chmin(dp[i], dp[i-j] + abs(h[i] - h[i-j]))

print(dp[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n, w = map(int, input().split())
W = [0] * n
V = [0] * n
for i in range(n):
    a, b = map(int, input().split())
    W[i] = a
    V[i] = b


dp = [[0] * (10 ** 5 + 10) for _ in range(n + 10)]
for i in range(n):
    for sum_num in range(w + 1):
        if sum_num - W[i] >= 0:
            dp[i + 1][sum_num] = max(dp[i][sum_num - W[i]] + V[i], dp[i][sum_num])
        else:
            dp[i + 1][sum_num] = dp[i][sum_num]

print(dp[n][w])

Fixed submission:
n, w = map(int, input().split())
W = [0] * n
V = [0] * n
for i in range(n):
    a, b = map(int, input().split())
    W[i] = a
    V[i] = b


dp = [[0] * (10 ** 5 + 10) for _ in range(n + 10)]
for i in range(n):
    for sum_num in range(w + 1):
        if sum_num - W[i] >= 0:
            dp[i + 1][sum_num] = max(dp[i][sum_num - W[i]] + V[i], dp[i][sum_num])
        else:
            dp[i + 1][sum_num] = dp[i][sum_num]

print(dp[n][w])
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
print('Hello world' if n == 1 else a + b)

Fixed submission:
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a + b)
Buggy python submission (verdict: Runtime Error):
from bisect import bisect_left
n = input()
lst = []
lst.append(1)
for i in range(2, int(math.sqrt(1000)) + 1):
    for j in range(2, 10):
        if i ** j <= 1000 and i ** j not in lst:
            lst.append(i ** j)

lst.sort()
print(lst[bisect_left(lst, n) - 1] if n not in lst else lst[bisect_left(lst, n)])

Fixed submission:
from bisect import bisect_left
import math
n = int(input())
lst = []
lst.append(1)
for i in range(2, int(math.sqrt(1000)) + 1):
    for j in range(2, 10):
        if i ** j <= 1000 and i ** j not in lst:
            lst.append(i ** j)

lst.sort()
print(lst[bisect_left(lst, n) - 1] if n not in lst else lst[bisect_left(lst, n)])
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
lst = [x for x in range(a, b + 1)]
lst_small = lst[:k]
lst_large = lst[-k:]
ans = list(set(lst_small) | set(lst_large))
ans = sorted(ans)
for i in range(len(ans)):
    print(ans[i])


Fixed submission:
a, b, k = map(int, input().split())
if b - a > k:
    lst_small = [x for x in range(a, a + k)]
    lst_large = [x for x in range(b - k + 1, b + 1)]
    ans = list(set(lst_small) | set(lst_large))
    ans = sorted(ans)
else:
    ans = [x for x in range(a, b + 1)]

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

Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
lst = [x for x in range(a, b + 1)]
lst_small = lst[:k]
lst_large = lst[-k:]
ans = list(set(lst_small) | set(lst_large))
ans = sorted(ans)
for i in range(len(ans)):
    print(ans[i])

Fixed submission:
a, b, k = map(int, input().split())
if b - a > k:
    lst_small = [x for x in range(a, a + k)]
    lst_large = [x for x in range(b - k + 1, b + 1)]
    ans = list(set(lst_small) | set(lst_large))
    ans = sorted(ans)
else:
    ans = [x for x in range(a, b + 1)]

for i in range(len(ans)):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
print(min(int(input(), int(input()))) + min(int(input(), int(input()))))

Fixed submission:
print(min(int(input()), int(input())) + min(int(input()), int(input())))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = list(map(int, input().split()))
print('Three' if len(set(s)) == 3 else 'Four')

Fixed submission:
n = int(input())
s = input().split()
print('Three' if len(set(s)) == 3 else 'Four')
Buggy python submission (verdict: Runtime Error):
x, y = int(input())
if x % y == 0 or  y % x == 0:
    print(-1)
else:
    print(x * 1)

Fixed submission:
x, y = map(int, input().split())
if x > y:
    if x % y == 0:
        print(-1)
    else:
        print(x * 1)
elif x == y:
    print(-1)
elif x < y:
    print(x * 1)
Buggy python submission (verdict: Runtime Error):
x = int().input()
a = int().input()
b = int().input()
print((x - a) % b)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    pront(i)

Fixed submission:
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)

Buggy python submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    pront(i)

Fixed submission:
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)

Buggy python submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
    a, b = map(int, input().split())
    L.append(a)
    L.append(b)

L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key = lambda x:x[0])
for i in range(n):
    print(L_dict_sort[i][1])

Fixed submission:
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)

Buggy python submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
    a, b = map(int, input().split())
    L.append(a)
    L.append(b)

L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key=lambda x:x[0])
for i in range(n):
    print(L_dict_sort[i][1])

Fixed submission:
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())
print((A + B) % 24)

Fixed submission:
A, B = map(int, input().split())
print((A + B) % 24)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a == b :
    print('H')
else :
    print('T')

Fixed submission:
a, b = input().split()
if a == b :
    print('H')
else :
    print('D')
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())
int_list = [i for i in range(a, b + 1)]
counter = 0
for i in range(len(int_list)):
    if int_list[i] % x == 0:
        counter += 1

print(counter)


Fixed submission:
a, b, x = map(int, input().split())
print(b // x - (a - 1) // x)
Buggy python submission (verdict: Runtime Error):
s = input()
flag = True
if 'C' not in s or 'F' not in s:
  flag = False

print('Yes' if s.index('C') < s.rindex('F') and flag == True else 'No')

Fixed submission:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')

Buggy python submission (verdict: Runtime Error):
s = input()
print('Yes' if s.index('C') < s.rindex('F') else 'No')

Fixed submission:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')

Buggy python submission (verdict: Runtime Error):
s = input()
print('Yes' if s.index('C') < s.rindex('F') else 'No')

Fixed submission:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')
Buggy python submission (verdict: Runtime Error):
N = input().split()
d = dict.fromkeys(N, 0)
for n in N:
    d[n] += 1

print(sum(d.values())


Fixed submission:
N = input().split()
num = len(set(N))
print(num)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b and b == c:
    print(1)
elif a == b or a == c:
    print(2)
else:
    print(3)

N = input().split()
d = dict.fromkeys(N, 0)
for n in N:
    d[n] += 1

print(sum(d.values())

Fixed submission:
N = input().split()
num = len(set(N))
print(num)
Buggy python submission (verdict: Runtime Error):
N = map(int, input().split())
for n in N:
    if n == 5 :
        cnt_5 += 1
    elif n == 7 :
        cnt_7 += 1

if cnt_5 == 2 & cnt_7 == 1:
    print('Yes')
else:
    print('N0')

Fixed submission:
a = [x for x in input().split()]
cnt_5 = 0
cnt_7 = 0
for x in a:
    if x == '5':
        cnt_5 += 1
    elif x == '7':
        cnt_7 += 1

print('YES' if cnt_5 == 2 and cnt_7 == 1 else 'NO')
Buggy python submission (verdict: Runtime Error):
from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))

# 1. 初期化
ok_lst = [x for x in range(0, 10) if x not in D]
ok_lst.sort(reverse = True)
stack = deque([x for x in ok_lst if x != 0])

while len(stack) > 0:
    # 2. 現在の情報の取得
    # 今回は現在の数字
    now_num = stack.pop()
    # 3. 処理
    # もしnow_numの桁数がnの桁数と同じかつ条件の値以上の場合，ansに記録しwhileを終了．
    # もしnow_numの桁数がnの桁数と同じかつ条件の値未満の場合，次は数値を足すとまずいのでcontinueで防ぐ
    if len(str(now_num)) == len(str(n)) and now_num >= n:
        ans = now_num
        break
    if len(str(now_num)) == len(str(n)) and now_num < n:
        continue
    # 4. 更新
    for x in ok_lst:
        next_num = str(now_num) + str(x)
        next_num = int(next_num)
        stack.append(next_num)

print(ans)

Fixed submission:
from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))
ok_lst = [x for x in range(0, 10) if x not in D]
stack = deque([x for x in ok_lst if x != 0])
while len(stack) > 0:
    now_num = stack.popleft()
    if now_num >= n:
        print(now_num)
        break
    for x in ok_lst:
        next_num = str(now_num) + str(x)
        stack.append(int(next_num))
Buggy python submission (verdict: Runtime Error):
l, r, d = map(int, input().split())
c = 0
for i in range(l,r+1):
  if i % d = 0:
    c += 1
print(c)

Fixed submission:
l, r, d = map(int, input().split())
c = 0
for i in range(l,r+1):
  if i % d == 0:
    c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
a = input()
if a in "abcdefghijklmnopqrstuvwxyz":
    print("a")
else
    print("A")

Fixed submission:
a = input()
if a in "abcdefghijklmnopqrstuvwxyz":
    print("a")
else:
    print("A")
Buggy python submission (verdict: Runtime Error):
i = [int(i) for i in input().split()]
n = i[0]
k = i[1]
n2 = n % k
print(n2 if k < n2 else k % n2)

Fixed submission:
i = [int(x) for x in input().split()]
n = i[0]
k = i[1]

t = n % k
t2 = k -t

print(min(t, t2))
Buggy python submission (verdict: Runtime Error):
from math import sqrt

i = input().split()
a = int(i[0] * 1000000000000000000000000)
b = int(i[1]* 1000000000000000000000000)
c = int(i[2]* 1000000000000000000000000)

if sqrt(a) + sqrt(b) < sqrt(c):
    print("Yes")
else:
    print("No")

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) -1

print(a[k])

Buggy python submission (verdict: Runtime Error):
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 or w == 1:
    print(1)

if (h * w % 2 == 0):
    print(h * w // 2)
else:
    print(h * w // 2 + 1)

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) -1

print(a[k])

Buggy python submission (verdict: Runtime Error):
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) + 1

print(a[k])

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) -1

print(a[k])

Buggy python submission (verdict: Runtime Error):
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input() + 1)

print(a[k])

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) -1

print(a[k])

Buggy python submission (verdict: Runtime Error):
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input())

print(a[k])

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input()) -1

print(a[k])