Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys


def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        sys.exit()
    n = N / 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N // 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N / 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N // 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    yesno = "Yes" if S[:N / 2] == S[N / 2:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N // 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
    S = input()
    if N % 2 == 0:
        print("No")
        quit()
    yesno = "Yes" if S[:N / 2] == S[N / 2:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N // 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = list(map(int,input().split()))

ans = 1
for i in A:
    ans *= i

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

Fixed submission:
N = int(input())

A = list(map(int,input().split()))

flag = True
ans = 1
if 0 in A:
    print(0)
    flag = False

if flag:
    for i in A:
        ans *= i
        if ans > pow(10,18):
            print(-1)
            flag = False
            break

if flag:
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int, input().split()))

l = [1]

now_town = 1
loop_town = 0
for i in range(N):
    now_town = A[now_town-1]
    if now_town in l:
        loop_town = l.index(now_town)
        break
    else:
        l.append(now_town)

loop_num = len(l)-loop_town
if K > loop_town:
    num = (K - loop_town)%loop_num + loop_town
else:
    num = K
# 
# num = (K+1)%len(l)
# print(l)

print(l[num])

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

l = [1]
kanryou_town = [0]*(N+1)
kanryou_town[1] = 1
now_town = 1
loop_town = 0
for i in range(N):
    now_town = A[now_town-1]
    if kanryou_town[now_town] == 1:
        loop_town = l.index(now_town)
        break
    else:
        kanryou_town[now_town] = 1
        l.append(now_town)

loop_num = len(l)-loop_town
if K > loop_town:
    num = (K - loop_town)%loop_num + loop_town
else:
    num = K
#
# num = (K+1)%len(l)
# print(l)

print(l[num])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
ans = 0
for i in range(0,N):
    for j in range(i,N):
        if S[i] != S[j]:
            for k in range(j,N):
                if  j-i != k-j and S[i] != S[k] and S[j] != S[k]:
                    ans += 1
print(ans)


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

# それぞれ違う文字の組み合わせの数
ans = S.count('R')*S.count('G')*S.count('B')

# j-i!=k-jの組み合わせ
for i in range(0, N-2):
    for j in range(i+1, N-1):
        k = j+j-i
        if k < N:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
ans = 0
for i in range(0,N):
    for j in range(i,N):
        if S[i] != S[j]:
            str = 'RGB'.replace(S[i],'').replace(S[j],'')
            ans += S.count(str, j+1, N+1)
            if j+j-i < N:
                if S[j+j-i] == str:
                    ans -=1
print(ans)

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

# それぞれ違う文字の組み合わせの数
ans = S.count('R')*S.count('G')*S.count('B')

# j-i!=k-jの組み合わせ
for i in range(0, N-2):
    for j in range(i+1, N-1):
        k = j+j-i
        if k < N:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
ans = 0
for i in range(0,N):
    for j in range(i,N):
        if S[i] != S[j]:
            for k in range(j,N):
                if  j-i != k-j and S[i] != S[k] and S[j] != S[k]:
                    ans += 1
print(ans)

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

# それぞれ違う文字の組み合わせの数
ans = S.count('R')*S.count('G')*S.count('B')

# j-i!=k-jの組み合わせ
for i in range(0, N-2):
    for j in range(i+1, N-1):
        k = j+j-i
        if k < N:
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1

print(ans)
Buggy python submission (verdict: Runtime Error):
N, x, y = map(int, input().split())

out = [0] * (N)

for i in range(1,N):
    for j in range(i+1,N+1):
        # i,jの距離を求める ３パーターンのうち一番短いパターン
        # i→jパターン abs(j-i)
        # i→x→y→jパターン abs(i-x)+1+abs(j-y)
        # i→y→x→jパターン abs(i-y)+1+abs(j-x)
        dist = min(abs(j-i), abs(i-x)+1+abs(j-y), abs(i-y)+1+abs(j-x))
        out[dist] += 1

for i in range(1,N):
    print(out[i])


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):
    L = int(input())

    # 普通に立方体が一番大きい
    print(pow(L/3,3))


Fixed submission:
L = int(input())

# 普通に立方体が一番大きい
print(pow(L/3,3))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

N = int(input())

Slist = {}
maxNum = 1
for i in range(N):
    S = input()
    if S in Slist.keys():
        Slist[S] += 1
        if Slist[S] > maxNum:
            maxNum = Slist[S]
    else:
        Slist[S] = 1

ans = []
for str in Slist.keys():
    if Slist[str] == maxNum:
        ans.append(str)

ans.sort()
for str in ans:
    print(str)

Fixed submission:
# import sys
# input = sys.stdin.readline

N = int(input())

Slist = []
for i in range(N):
    Slist.append(input())
    # if S in Slist.keys():
    #     Slist[S] += 1
    #     if Slist[S] > maxNum:
    #         maxNum = Slist[S]
    # else:
    #     Slist[S] = 1
Slist.sort()

max_cnt = 1
cnt = 1
s_old = Slist[0]
max_Slist = []

for i in range(1,N):
    if Slist[i] == s_old:
        cnt += 1
    else:
        if cnt > max_cnt:
            max_cnt = cnt
            max_Slist = [s_old]
        elif cnt == max_cnt:
            max_Slist.append(s_old)
        s_old = Slist[i]
        cnt = 1

if Slist[N-1] == s_old:
    if cnt > max_cnt:
        max_Slist = [s_old]
    elif cnt == max_cnt:
        max_Slist.append(s_old)

for str in max_Slist:
    print(str)

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

Slist = {}
maxNum = 1
for i in range(N):
    S = input()
    if S in Slist.keys():
        Slist[S] += 1
        if Slist[S] > maxNum:
            maxNum = Slist[S]
    else:
        Slist[S] = 1

ans = []
for str in Slist.keys():
    if Slist[str] == maxNum:
        ans.append(str)

ans.sort()
for str in ans:
    print(str)

Fixed submission:
# import sys
# input = sys.stdin.readline

N = int(input())

Slist = []
for i in range(N):
    Slist.append(input())
    # if S in Slist.keys():
    #     Slist[S] += 1
    #     if Slist[S] > maxNum:
    #         maxNum = Slist[S]
    # else:
    #     Slist[S] = 1
Slist.sort()

max_cnt = 1
cnt = 1
s_old = Slist[0]
max_Slist = []

for i in range(1,N):
    if Slist[i] == s_old:
        cnt += 1
    else:
        if cnt > max_cnt:
            max_cnt = cnt
            max_Slist = [s_old]
        elif cnt == max_cnt:
            max_Slist.append(s_old)
        s_old = Slist[i]
        cnt = 1

if Slist[N-1] == s_old:
    if cnt > max_cnt:
        max_Slist = [s_old]
    elif cnt == max_cnt:
        max_Slist.append(s_old)

for str in max_Slist:
    print(str)
Buggy python submission (verdict: Runtime Error):
resolve()

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

    if N == M:
        print('Yes')
    else:
        print('No')

Fixed submission:
N,M = map(int, input().split())

if N == M:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())

out = 0

for x in range(K+1):
    for y in range(K+1):
        for z in range(K+1):
            if x+y+z == S:
                out += 1
print(out)


Fixed submission:
K, S = map(int, input().split())

out = 0

# 全探査だと間に合わない
# zはあるかないかの２択なので外せる
for x in range(K+1):
    for y in range(K+1):
        z = S-x-y
        if 0 <= z <= K:
            out += 1
print(out)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

total = sum(a)
thres = total/(4*m)

ct = 0
for i in a:
    if i >= thres:
        ct += 1

if ct >= m:
    print("Yes")
else:
    print("No")d

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

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

total = sum(a)
thres = total/(4*m)

ct = 0
for i in a:
    if i >= thres:
        ct += 1

if ct >= m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

h, n = map(int, input().split())
a = ["" for _ in range(n)]
b = ["" for _ in range(n)]

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

inf = 10**12
dp = [[inf for j in range(h+1)] for i in range(n+1)]
for i in range(n+1):
    dp[i][0] = 0
#print("dp", dp)
 
for i in range(n):
    for j in range(1,h+1):
        #print("-"*50)
        #print("i, j", i, j)
        if j <= a[i]:
            #print(str(j)+" <= a["+str(i)+"]", a[i])
            #print("b[i]", b[i])
            #print("dp[i][j]", dp[i][j])
            #print("dp[i+1][j] = min(): ", min(b[i], dp[i][j]))
            dp[i+1][j] = min(b[i], dp[i][j])
            
        else:
            #print(str(j)+" > a["+str(i)+"]", a[i])
            #print("dp[i][j]", dp[i][j])
            #print("dp[i+1][j - a[i]]+b[i]", dp[i+1][j - a[i]]+b[i])
            #print("dp[i+1][j] = min(): ", min(dp[i][j], dp[i+1][j - a[i]]+b[i]))
            dp[i+1][j] = min(dp[i][j], dp[i+1][j - a[i]]+b[i])
    #print(dp)
 
#print(dp)
print(dp[n][h])

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

h, n = map(int, input().split())
a = ["" for _ in range(n)]
b = ["" for _ in range(n)]

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

inf = 10**12
dp = [[inf for j in range(h+1)] for i in range(n+1)]
for i in range(n+1):
    dp[i][0] = 0
#print("dp", dp)
 
for i in range(n):
    for j in range(1,h+1):
        #print("-"*50)
        #print("i, j", i, j)
        if j <= a[i]:
            #print(str(j)+" <= a["+str(i)+"]", a[i])
            #print("b[i]", b[i])
            #print("dp[i][j]", dp[i][j])
            #print("dp[i+1][j] = min(): ", min(b[i], dp[i][j]))
            dp[i+1][j] = min(b[i], dp[i][j])
            
        else:
            #print(str(j)+" > a["+str(i)+"]", a[i])
            #print("dp[i][j]", dp[i][j])
            #print("dp[i+1][j - a[i]]+b[i]", dp[i+1][j - a[i]]+b[i])
            #print("dp[i+1][j] = min(): ", min(dp[i][j], dp[i+1][j - a[i]]+b[i]))
            dp[i+1][j] = min(dp[i][j], dp[i+1][j - a[i]]+b[i])
    #print(dp)
 
#print(dp)
print(dp[n][h])
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import fractions
import numpy as np
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)


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

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

if m == n:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-


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

count = 0
for i in range(n):
    if i == 0:
        count += 1
    else:
        if min(p[:i]) >= p[i]:
            count += 1
        else:
            pass

print(count)

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

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

count = 1
min_dp = p[0]
for i in range(1, n):
    if p[i] < min_dp:
        count += 1
        min_dp = p[i]

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import fractions
import numpy as np
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)


Fixed submission:
# -*- coding: utf-8 -*-
import fractions
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a[1:]:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import fractions
import numpy as np
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)


Fixed submission:
# -*- coding: utf-8 -*-
import fractions
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a[1:]:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import fractions
import numpy as np
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in range(1, n):
    div = div*a[i]//fractions.gcd(div, a[i])

ans = 0
for i in range(n):
    ans += div//a[i]

print(ans%mod)


Fixed submission:
# -*- coding: utf-8 -*-
import fractions
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a[1:]:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import fractions
import numpy as np

mod = 10**9+7

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

div = a[0]
for i in range(1, n):
    div = div*a[i]//fractions.gcd(div, a[i])

np_a = np.array(a)
ans = div//np_a
print(np.sum(ans)%mod)


Fixed submission:
# -*- coding: utf-8 -*-
import fractions
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a[1:]:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding:utf-8 -*-
import numpy as np

x = int(input())
num = [i for i in range(2, 100010)]
#print(num)

np_x = np.array(num)

for i in range(2, 100010):
    b = np.logical_or(np_x == i, np_x%i != 0)
    np_x = np_x[b]
#print(np_x)

ans = np_x[np_x >= x]
#print(ans)
print(ans[0])




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

def is_prime(N):
    if N == 1:
        return False
    for k in range(2, int(math.sqrt(N))+1):
        if N%k == 0:
            return False
    return True

X = int(input())

while True:
    if is_prime(X):
        print(X)
        exit()
    X += 1
Buggy python submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(a, b))


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

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

c_a = 1

while True:
    if a*c_a%b == 0:
        break
    c_a += 1

print(a*c_a)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)

lis = []
for i in range(1, n+1):
    lis.append(str(a.index(i)))
print(" ".join(lis))


Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
x = np.array(a)
y = list(np.argsort(x)[1::])
#print(y)
y = map(str, y)
#print(y)
print(" ".join(y))
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

n,k,q = map(int, input().split())
a = [int(input()) for _ in range(q)]
#print(a)

pts = [k for _ in range(n)]

for i in range(q):
    for j in range(n):
        if j != a[i]-1:
            pts[j] -= 1
        else:
            pass
#print(pts)

for i in range(n):
    if pts[i] > 0:
        print("Yes")
    else:
        print("No")


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

n, k, q = map(int, input().split())


li = [0]*n
for i in range(q):
    a = int(input())
    li[a-1] += 1

for i in range(n):
    if li[i] > q-k:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

n = int(input())
s = n - 1

ans = 0
for i in range(s+1):
    ans += i
print(ans)

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

n = int(input())
s = n - 1

print(s*(s+1)//2)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = ["" for _ in range(n)]

for i in range(n):
    s[i] = input()

#print(s)

s_list = [[] for _ in range(n)]
for i in range(n):
    #listに格納
    for j in range(10):
        s_list[i].append(s[i][j])
    #ソートをかける
    s_list[i].sort()

count = 0

#s_listの要素（リスト）について、
#他の要素と同一のものがあるかチェック
for i in range(n):
    for j in range(i+1, n):
        c = (s_list[i] == s_list[j])
        if c == True:
           count += 1
           
print(count)

#重複を削除して要素数カウント


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

n = int(input())
s = [input() for _ in range(n)]

dic = {}
for i in range(n):
    tmp = sorted(list(s[i]))
    tmp2 = "".join(tmp)
    if dic.get(tmp2) == None:
        dic[tmp2] = 1
    else:
        dic[tmp2] += 1

#print(dic)
ans = 0
for k, v in dic.items():
    #print(k, v)
    if v >= 2:
        num = (v-1)
        #print("num: ", num)
        #print("num//2*(num+1): ", num//2*(num+1))
        ans += num*(num+1)//2
        #print(ans)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

n = int(input())
a = ["" for _ in range(n)]

for i in range(n):
    a[i] = int(input())


ans = ["" for _ in range(n)]
for i in range(n):
    a_test = a[:]
    del a_test[i]
    ans[i] = max(a_test)


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


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

n = int(input())
a = [int(input()) for _ in range(n)]

max_a = max(a)
b = a[:]
b.remove(max_a)
max_b = max(b)

if max_a == max_b:
    for i in range(n):
        print(max_a)
else:
    idx = a.index(max_a)
    for i in range(n):
        if idx == i:
            print(max_b)
        else:
            print(max_a)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
L, R = map(int, input().split())
end = min(R, L + 4038)

ans = 2018
for i in range(L, end+1):
    for j in range(i+1, end+1):
        x = i*j%2019
        ans = min(ans, x)
print(ans)

Fixed submission:
# -*- coding: utf-8 -*-
L, R = map(int, input().split())
end = min(R, L + 637*2)

ans = 2018
for i in range(L, end+1):
    for j in range(i+1, end+1):
        x = i*j%2019
        ans = min(ans, x)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

L, R = map(int, input().split())

mod = 2019

ans = 2018

for i in range(L, R+1):
    for j in range(i+1, R+1):
        if i==j:
            continue
        else:
            ans = min(ans, (i*j)%mod)

print(ans)



Fixed submission:
# -*- coding: utf-8 -*-
L, R = map(int, input().split())
end = min(R, L + 637*2)

ans = 2018
for i in range(L, end+1):
    for j in range(i+1, end+1):
        x = i*j%2019
        ans = min(ans, x)
print(ans)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

#N個のリンゴ
#リンゴiの味＝L+i-1

#入力（数値）
spline = input().split()
N = int(spline[0])
L = int(spline[1])

#リンゴの味
taste = []
for i in range(1,N+1): #リンゴNは１から数える
    taste.append(L+i-1)  #味の設定
#print(taste)

#1つも食べなかった場合の味
taste_max = sum(taste)
#print("max"+str(taste_max))


#1つ食べた場合の味のリスト
taste_any = []
for k in range(0,N):
    taste_any.append(sum(taste) - taste[k])
#print(taste_any)

#maxとanyの差
#numpy配列にしてから計算
taste_any = np.asarray(taste_any)
diff = abs(sum(taste) - taste_any)
#numpy配列からリストに戻す（.indexメソッドが使いたいから）
diff_list = diff.tolist()
#print("diff_list"+str(diff_list))
#最小値のインデックスを取得する
coef = diff_list.index(min(diff_list))
#print(coef)

print(taste_any[coef])




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

#同じ数字が連続する箇所が存在するならBad, そうでなければGood

S = input()
jud = False

#もし4桁じゃなかったら×
if len(S) != 4:
    print("4桁でありません")

for i in range(0,3):
    if S[i] == S[i+1]:
        jud = True
    else:
        pass

if jud == True:
    print("Bad")
else:
    print("Good")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

a,b,c,d=map(int, input().split())

n_c = b//c - (a-1)//c
n_d = b//d - (a-1)//d
#print("n_c: ", n_c)
#print("n_d: ", n_d)

cd = c*d//np.gcd(c,d)
n_cd = b//cd - (a-1)//cd
#print("n_cd: ", n_cd)

n_ab = b+1-a
#print("n_ab: ", n_ab)

print(n_ab-(n_c+n_d)+n_cd)



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

a,b,c,d=map(int, input().split())

n_c = b//c - (a-1)//c
n_d = b//d - (a-1)//d
#print("n_c: ", n_c)
#print("n_d: ", n_d)

cd = c*d//fractions.gcd(c,d)
n_cd = b//cd - (a-1)//cd
#print("n_cd: ", n_cd)

n_ab = b+1-a
#print("n_ab: ", n_ab)

print(n_ab-(n_c+n_d)+n_cd)

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

a,b,c,d=map(int, input().split())

n_c = b//c - a//c
n_d = b//d - a//d
#print("n_c: ", n_c)
#print("n_d: ", n_d)

cd = c*d//math.gcd(c,d)
n_cd = b//cd - a//cd
#print("n_cd: ", n_cd)

n_ab = b+1-a
#print("n_ab: ", n_ab)

print(n_ab-(n_c+n_d)+n_cd)



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

a,b,c,d=map(int, input().split())

n_c = b//c - (a-1)//c
n_d = b//d - (a-1)//d
#print("n_c: ", n_c)
#print("n_d: ", n_d)

cd = c*d//fractions.gcd(c,d)
n_cd = b//cd - (a-1)//cd
#print("n_cd: ", n_cd)

n_ab = b+1-a
#print("n_ab: ", n_ab)

print(n_ab-(n_c+n_d)+n_cd)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

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

ans = []
for i in range(1, max(a,b)):
    if a%i==0 and b%i==0:
        ans.append(i)

#print(ans)

t = len(ans)-k
print(ans[t])


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

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

ans = []
for i in range(1, max(a,b)+1):
    if a%i==0 and b%i==0:
        ans.append(i)

#print(ans)

t = len(ans)-k
print(ans[t])