Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# 12/25 AC日記
# GCDについて,2,3を追加しておくと全体のgcdは必ず1
# つまり残りは2の倍数または3の倍数を入れることにする?
# 2,3,a ではaは素数ではない.また3,(2+a)=3なのでa = 4?と思うが(3+a)は偶数なので7とする?
# 2,3,7に加えるとしたら？->この方法だと20000個数も取れないでしょ
# ちょっと難しいので休憩

# 12/27 再開
# 素因数は必ず2種類あるべきなのではないか
# それを2,3とする
# 0(mod2) ∧ !0(mod3) -> 総和は3の倍数
# 全部入れると丁度2万個なのでこれが想定されていそう
n = int(input())
nn = n
if n == 3:
    print("2 5 63")
else:
    res = [2, 4, 3, 9]
    n -= 4
    for i in range(2, 5001):
        if n < 2:
            break
        else:
            n -= 2
            res.append(6 * i - 4)
            res.append(6 * i - 2)
    for i in range(3, 5000, 2):
        if n < 2:
            break
        else:
            n -= 2
            res.append(6 * i - 3)
            res.append(6 * i + 3)
    for i in range(1, 5001):
        if n == 0:
            break
        else:
            n -= 1
            res.append(6 * i)

for i in range(len(res)):
    print(str(res[i]) + " ", end="")

Fixed submission:
# 12/25 AC日記
# GCDについて,2,3を追加しておくと全体のgcdは必ず1
# つまり残りは2の倍数または3の倍数を入れることにする?
# 2,3,a ではaは素数ではない.また3,(2+a)=3なのでa = 4?と思うが(3+a)は偶数なので7とする?
# 2,3,7に加えるとしたら？->この方法だと20000個数も取れないでしょ
# ちょっと難しいので休憩

# 12/27 再開
# 素因数は必ず2種類あるべきなのではないか
# それを2,3とする
# 0(mod2) ∧ !0(mod3) -> 総和は3の倍数
# 全部入れると丁度2万個なのでこれが想定されていそう
n = int(input())
nn = n
if n == 3:
    print("2 5 63")
else:
    res = [2, 4, 3, 9]
    n -= 4
    for i in range(2, 5001):
        if n < 2:
            break
        else:
            n -= 2
            res.append(6 * i - 4)
            res.append(6 * i - 2)
    for i in range(3, 5000, 2):
        if n < 2:
            break
        else:
            n -= 2
            res.append(6 * i - 3)
            res.append(6 * i + 3)
    for i in range(1, 5001):
        if n == 0:
            break
        else:
            n -= 1
            res.append(6 * i)
    for i in range(len(res)):
        print(str(res[i]) + " ", end="")
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

nmr = list(map(int,input().split()))
N,M,R = nmr[0],nmr[1],nmr[2]
perm = list(map(int,input().split()))
perm.sort()
dist = [[int(1e9) for i in range(N+1)] for j in range(N+1)]
res = int(1e11)

# 各距離を代入する
for i in range(M):
    abc = list(map(int,input().split()))
    a,b,c = abc[0],abc[1],abc[2]
    dist[a][b] = c
    dist[b][a] = c

# Warshall–Floyd Algorithm
for k in range(1,N+1):
    for i in range(1, N+1):
        for j in range(1,N+1):
            if(dist[i][j] > dist[i][k] + dist[k][j]):
                dist[i][j] = dist[i][k] + dist[k][j]

# 各順列について,距離の総和を求める
for dir in itertools.permutations(perm):
    direction = list(dir)
    tmpdir = 0
    for i in range(len(direction) - 1):
        tmpdir += dist[direction[i]][direction[i+1]]
    res = min(tmpdir,res)

print(res)

Fixed submission:
import itertools

nmr = list(map(int,input().split()))
N,M,R = nmr[0],nmr[1],nmr[2]
perm = list(map(int,input().split()))
perm.sort()
dist = [[int(1e9) for i in range(N+1)] for j in range(N+1)]
res = int(1e11)

# 各距離を代入する
for i in range(M):
    abc = list(map(int,input().split()))
    a,b,c = abc[0],abc[1],abc[2]
    dist[a][b] = c
    dist[b][a] = c

# Warshall–Floyd Algorithm
for k in range(1,N+1):
    for i in range(1, N+1):
        for j in range(1,N+1):
            if(dist[i][j] > dist[i][k] + dist[k][j]):
                dist[i][j] = dist[i][k] + dist[k][j]

# 各順列について,距離の総和を求める
for dir in itertools.permutations(perm):
    direction = list(dir)
    tmpdir = 0
    for i in range(len(direction) - 1):
        tmpdir += dist[direction[i]][direction[i+1]]
    res = min(tmpdir,res)

print(res)
Buggy python submission (verdict: Runtime Error):
n,m,k = map(int, input().split())
ab = list(map(int, input().split())) + list(map(int, input().split()))
O = 0
ab.sort()
for i in range(len(ab)):
    k -= ab[i]
    if k < 0:
        break
    O +=1
print(O)


Fixed submission:
a = int(input())

a = a + a**2 + a**3
print(a)
Buggy python submission (verdict: Runtime Error):
a = input("insert a here")

if a.isupper():dfdf
    print('A')
else:
    print('a')

Fixed submission:
a = input()

if a.isupper():
    print('A')
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
import os,sys
c=0

n=input()
for i in range(int(n)):
    m=input()
    one=m[0]
    two=m[2]
    if(one==two):
        c+=1
    
if(c>=3):
    print('Yes')
else:
    print('No')


Fixed submission:
import os,sys

s=input()
n=len(s)
if s[n-1]=='s':
    s=s+'es'
else:
    s=s+'s'

print(s)
Buggy python submission (verdict: Runtime Error):
import os,sys
c=0

n=input()
for i range(n):
    m=input()
    one=m[0]
    two=m[2]
    if(one==two):
        c+=1
    
if(c>=3):
    print('Yes')
else:
    print('No')


Fixed submission:
import os,sys
c=0
ok=False
n=input()
for i in range(int(n)):
    m=input()
    one=m[0]
    two=m[2]
    if one==two:
        c+=1
    else:
        c=0
    if c>=3:
        ok=True
    
if(ok):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import sys
n = input()
p=3
a=n/100
n=n-a
b=n/10
n=n-b
c=n/
if(p==0):
    print(hon)
else if(p==1):
    print(pon)
else if(p==2):
    print(bon)


Fixed submission:
import sys
N = int(input())
n=N%10
if n==2 or n==4 or n==5 or n==7 or n==9:
    print("hon")
elif n==0 or n==1 or n==6 or n==8:
    print("pon")
elif n==3:
    print("bon")
Buggy python submission (verdict: Runtime Error):
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: Runtime Error):
n = int(input())
p = list(map(int,input().split()))
ans = 0
temp = 0
for i in range(n):
    """
    for j in range(i+1):
        if p[i]<=p[j]:
            temp+=1
        if temp == i+1:
            #print("i:"+str(i))
            ans+=1
    temp=0
            """
    if min(p[:i+1]) == p[i]:
        #print("i:"+str(i))
        ans+=1
print(ans)

Fixed submission:
n,m = map(int,input().split())
if n == m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
if a>k and a>0:
    a-=k
else:
    if b>k-a and b>0:
        b-=(k-a)
    else:
        b=0
    a=0
print(str(a)+" "+str(b))

Fixed submission:
a,b,k = map(int,input().split())
if a>k and a>0:
    a-=k
else:
    if b>k-a and b>0:
        b-=(k-a)
    else:
        b=0
    a=0
print(str(a)+" "+str(b))
Buggy python submission (verdict: Runtime Error):
from sympy import nextprime
print(nextprime(int(input())))

Fixed submission:
x = int(input())
count=0
while count<1:
    ans=0
    for i in range(2,int(pow(x,0.5))):
        if x%i==0:
            ans+=1
            break
    if ans==0:
        count+=1
    else:
        x+=1
print(x)
Buggy python submission (verdict: Runtime Error):
for i in range(n):
    if i<k:
        if t[i] =='r':
            ans+=p
        elif t[i] =='s':
            ans+=r
        else :
            ans+=s
    else:
        if t[i] =='r' and t[i-k]!='r':
            ans+=p
        elif t[i] =='s' and t[i-k]!='s':
            ans+=r
        elif t[i] =='p' and t[i-k]!='p':
            ans+=s
        else:
            t[i]='a'
            continue
print(ans)

Fixed submission:
n,k = map(int,input().split())
r,s,p = map(int,input().split())
t = list(input())
ans =0
for i in range(n):
    if i<k:
        if t[i] =='r':
            ans+=p
        elif t[i] =='s':
            ans+=r
        else :
            ans+=s
    else:
        if t[i] =='r' and t[i-k]!='r':
            ans+=p
        elif t[i] =='s' and t[i-k]!='s':
            ans+=r
        elif t[i] =='p' and t[i-k]!='p':
            ans+=s
        else:
            t[i]='a'
            continue
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,y=map(int,input().split())
anslist=[]
for i in range(n+1):
    for j in range(n-i+1):
        for k in range(n-i-j+1):
            if i*10000+j*5000+k*1000 == y :
                list=[i,j,k]
                anslist.append(list)
if len(anslist)>0:
    print("{} {} {}".format(anslist[0][0],anslist[0][1],anslist[0][2],))
else:
    print("{} {} {}".format(-1,-1,-1))

Fixed submission:
n,y=map(int,input().split())
anslist=[]
for i in range(n+1):
    for j in range(n-i+1):
        if i*10000+j*5000+(n-i-j)*1000 == y :
            print(i,j,n-i-j)
            exit()
print("{} {} {}".format(-1,-1,-1))
Buggy python submission (verdict: Runtime Error):

val = input()
if val <= 999:
  str_val = str(val)
  val_one = str_val[-1]
  if val_one in {'2','4','5','9','7'}:
    print('hon')
  elif val_one in {'0','1','6','8'}:
    print('pon')
  elif val_one == '3':
    print('bon')

Fixed submission:
val = input()
if int(val) <= 999:
  str_val = str(val)
  val_one = str_val[-1]
  if val_one in {'2','4','5','9','7'}:
    print('hon')
  elif val_one in {'0','1','6','8'}:
    print('pon')
  elif val_one == '3':
    print('bon')
Buggy python submission (verdict: Runtime Error):
Input = input()

Result = 3*Input**2

print(Result)

Fixed submission:
Input =  int(input())

if 1<=Input<=100:
  Result = 3*Input**2

print(Result)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

nc_lst = [i for i in range(1, n)]
count = 0

for i in range(len(nc_lst)):
    nc = nc_lst[i]
    for j in range(1, nc + 1):
        if nc // j == nc / j:
            count += 1
print(count)

Fixed submission:
n = int(input())

answer = 0
for i in range(1, n):
    answer += (n - 1) // i
print(answer)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_lst = list(map(int, input().split()))
for i in range(n):
    a_lst[i] %= (10 ** 9 + 7)

lst = []
for i in range(n):
        lst.append((sum(a_lst) - sum(a_lst[: i + 1])) % (10 ** 9 + 7))

ans = 0
for i in range(n - 1):
    ans += (a_lst[i] * lst[i]) % (10 ** 9 + 7)
ans %= 10 ** 9 + 7
print(ans)

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

a_lst.reverse()
tmp = a_lst[0]
lst = []
for i in range(1, n):
    lst.append(tmp)
    tmp += a_lst[i]
    tmp %= (10 ** 9 + 7)
lst.reverse()
a_lst.reverse()

ans = 0
for i in range(n - 1):
    ans += (a_lst[i] * lst[i]) % (10 ** 9 + 7)
ans %= (10 ** 9 + 7)
print(ans)

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

ans = 0
for i in range(n-1):
    for j in range(i+1, n):

        a1 = a_lst[i]
        a2 = a_lst[j]
        ans += (a1 % (10 ** 9 + 7)) * (a2 % (10 ** 9 + 7))
        ans %= (10 ** 9 + 7)

print(ans)

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

a_lst.reverse()
tmp = a_lst[0]
lst = []
for i in range(1, n):
    lst.append(tmp)
    tmp += a_lst[i]
    tmp %= (10 ** 9 + 7)
lst.reverse()
a_lst.reverse()

ans = 0
for i in range(n - 1):
    ans += (a_lst[i] * lst[i]) % (10 ** 9 + 7)
ans %= (10 ** 9 + 7)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = 0

whlie True:
  if n % 1000 == 0:
    break
   
  n += 1
  x += 1
  
print(x)


Fixed submission:
n = int(input())
x = 0

while True:
    if n % 1000 == 0:
        break
    n += 1
    x += 1

print(x)

Buggy python submission (verdict: Runtime Error):
n = int(input())
x = 0

whlie True:
  if n % 1000:
    break
   
  n += 1
  x += 1
  
print(x)

Fixed submission:
n = int(input())
x = 0

while True:
    if n % 1000 == 0:
        break
    n += 1
    x += 1

print(x)
Buggy python submission (verdict: Runtime Error):
def distance(x, y):
    return (x ** 2 + y ** 2) ** (1 / 2)


def main():
    n, d = map(int, input().split())
    xy_lst = [list(map(int, input().split())) for _ in range(n)]
    count = 0

    for i in range(n):
        x = xy_lst[i][0]
        y = xy_lst[i][1]
        if distance(x, y) <= d:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Fixed submission:
s = str(input())
t = str(input())
count = 0

for i in range(len(s)):
    if s[i] != t[i]:
        count += 1
        
print(count)
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    abc = 'abcdefghijklmnopqrstuvwxyz'

    length = 1
    accumulation = 0
    while True:
        if n <= 26 ** length + accumulation:
            break
        else:
            accumulation += 26 ** length
            length += 1


    if length == 1:
        answer = abc[n - 1]

    else:
        lst = []
        for _ in range(length - 1):
             if n % 26 != 0:
                 tmp = n // (26 ** (length - 1))
             else:
                 tmp = (n - 1) // (26 ** (length - 1))

             lst.append(tmp)
             n -= (26 ** (length - 1) * tmp)
             length -= 1

        lst.append(n)

        answer = ''
        for i in range(len(lst)):
            number = lst[i]
            answer += abc[number - 1]


    print(answer)



if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    alp = 'abcdefghijklmnopqrstuvwxyz'
    answer = ''

    while n >= 1:
        n -= 1
        answer += alp[n % 26]
        n //= 26

    real_answer = ''
    for i in range(1, len(answer) + 1):
        real_answer += answer[-i]

    print(real_answer)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    abc = 'abcdefghijklmnopqrstuvwxyz'

    length = 1
    accumulation = 0
    while True:
        if n <= 26 ** length + accumulation:
            break
        else:
            accumulation += 26 ** length
            length += 1


    if length == 1:
        answer = abc[n - 1]

    else:
        lst = []
        for _ in range(length - 1):
             tmp = n // (26 ** (length - 1))
             lst.append(tmp)
             n -= (26 ** (length - 1) * tmp)
             length -= 1

        lst.append(n)

        answer = ''
        for i in range(len(lst)):
            number = lst[i]
            answer += abc[number - 1]


    print(answer)



if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    alp = 'abcdefghijklmnopqrstuvwxyz'
    answer = ''

    while n >= 1:
        n -= 1
        answer += alp[n % 26]
        n //= 26

    real_answer = ''
    for i in range(1, len(answer) + 1):
        real_answer += answer[-i]

    print(real_answer)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    x, n = map(int, input().split())
    p_lst = list(map(int, input().split()))

    if n == 0:
        minimum = x
    else:
        if x not in p_lst:
            minimum = x

        else:
            lst = []
            flag = False

            while True:
                x1 = x
                x2 = x
                x1 += 1
                x2 -= 1

                if x1 not in p_lst:
                    lst.append(x1)
                    flag = True
                if x2 not in p_lst:
                    lst.append(x2)
                    flag = True

                if flag:
                    break

            minimum = min(lst)

    print(minimum)


if __name__ == '__main__':
    main()

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

    if n == 0:
        minimum = x
    else:
        if x not in p_lst:
            minimum = x

        else:
            lst = []
            flag = False
            x1 = x
            x2 = x

            while True:
                x1 += 1
                x2 -= 1

                if x1 not in p_lst:
                    lst.append(x1)
                    flag = True
                if x2 not in p_lst:
                    lst.append(x2)
                    flag = True

                if flag:
                    break

            minimum = min(lst)

    print(minimum)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    a, b = input().split()
    b = 100 * b

    answer = a * b // 100
    print(answer)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    a, b = input().split()
    a = int(a)
    b_1 = ''
    b_1 += b[0]
    b_1 += b[2:]
    b_1 = int(b_1)

    answer = (a * b_1) // 100
    print(answer)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n = str(input())
if n[-1] in ['2', '4', '5', '7', '9']:
    how_to_read = 'hon'
elif n[-1] in ['0', '1', '6', '8':
    how_to_read = 'pon'
else:
    how_to_read = 'bon'
    
print(how_to_read)

Fixed submission:
n = str(input())
if n[-1] in ['2', '4', '5', '7', '9']:
    how_to_read = 'hon'
elif n[-1] in ['0', '1', '6', '8']:
    how_to_read = 'pon'
else:
    how_to_read = 'bon'
    
print(how_to_read)
Buggy python submission (verdict: Runtime Error):
s = str(input())
T = str(input())
t_before = ''
for i in range(len(s)):
    t_before += t[i]

if s == t_before:
    print('Yes')
else:
    print('No')

Fixed submission:
s = str(input())
t = str(input())
t_before = ''
for i in range(len(s)):
    t_before += t[i]

if s == t_before:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import math


def combination(n, r):
    if n <= 1:
        return 0
    elif n == 2:
        return 1
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def count_list(lst):
    count_lst = [0] * (max(lst) + 1)

    for i in lst:
        count_lst[i] += 1

    return count_lst


def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    lst1 = count_list(a_lst)
    lst2 = [0] * len(lst1)
    for i in range(len(lst1)):
        lst2[i] = combination(lst1[i], 2)
    tmp = sum(lst2)

    for i in range(n):
        a = a_lst[i]
        tmp_tmp = tmp
        tmp -= lst2[a]
        tmp += combination(lst1[a] - 1, 2)
        print(tmp)
        tmp = tmp_tmp


if __name__ == '__main__':
    main()

Fixed submission:
import math


def combination(n, r):
    if n <= 1:
        return 0
    elif n == 2:
        return 1
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def count_list(lst):
    count_lst = [0] * (max(lst) + 1)

    for i in lst:
        count_lst[i] += 1

    return count_lst


def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    lst1 = count_list(a_lst)
    lst2 = [0] * len(lst1)
    for i in range(len(lst1)):
        lst2[i] = combination(lst1[i], 2)
    tmp = sum(lst2)

    for i in range(n):
        a = a_lst[i]
        print(tmp - (lst1[a] - 1))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
ps_lst = [list(map(str,input().split())) for _ in range(m)]
ac_count = 0
wa_count = 0

ac_prolst = []
for i in range(len(ps_lst)):
    number = ps_lst[i][0]
    answer = ps_lst[i][1]
    if answer=='AC':
        ac_prolst.append(number)
ac_lst = list(set(ac_prolst))

ps_dic = {}
for i in range(m):
    number = ps_lst[i][0]
    if number in ac_lst:
        tmp_dic = {number: 'WA'}
        ps_dic.update(tmp_dic)

for i in range(m):
    number = ps_lst[i][0]
    answer = ps_lst[i][1]

    if number in ac_lst:
        if answer == 'AC' and ps_dic[number] == 'WA':
            ac_count += 1
            tmp_dic = {number: 'AC'}
            ps_dic.update(tmp_dic)
        elif answer == 'WA' and ps_dic[number] == 'WA':
            wa_count += 1

print('{} {}'.format(ac_count, wa_count))

Fixed submission:
n = int(input())
a_lst = list(map(int,input().split()))
new_lst = list(set(a_lst))

if len(a_lst)==len(new_lst):
    print('YES')
else:
    print('NO')

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

for i in range(n):
    if a_lst.count(a_lst[i])!=1:
        print('NO')
        break
else:
    print('YES')

Fixed submission:
n = int(input())
a_lst = list(map(int,input().split()))
new_lst = list(set(a_lst))

if len(a_lst)==len(new_lst):
    print('YES')
else:
    print('NO')

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

for i in range(n):
    if a_lst.count(a_lst[i])!=1:
        print('NO')
        break
else:
    print('YES')

Fixed submission:
n = int(input())
a_lst = list(map(int,input().split()))
new_lst = list(set(a_lst))

if len(a_lst)==len(new_lst):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))

    tmp1_lst = []
    for i in range(k):
        tmp1_lst.append(p_lst[i])

    for i in range(n - k + 1):
        tmp2_lst = p_lst[i:i + k]
        if sum(tmp1_lst) < sum(tmp2_lst):
            tmp1_lst = tmp2_lst

    maximum = 0
    for i in range(k):
        number = tmp1_lst[i]
        maximum += number * (number + 1) / 2 / number

    print(maximum)


if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n, k = map(int, input().split())
    p_lst = list(map(int, input().split()))
    lst = []

    for i in range(n):
        lst.append((p_lst[i] + 1) / 2)

    tmp_sum = sum(lst[:k])
    maximum = tmp_sum
    for i in range(n - k):
        tmp_sum -= lst[i]
        tmp_sum += lst[i + k]
        maximum = max(maximum, tmp_sum)

    print(maximum)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
s, t = map(str,input())

ans = ''
for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)

Fixed submission:
n = int(input())
s, t = map(str,input().split())

ans = ''
for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s, t = map(str,input())

ans = '' 
for i in range(n):
    ans += s[i]
    ams += t[i]
    
print(ans)

Fixed submission:
n = int(input())
s, t = map(str,input().split())

ans = ''
for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect


def main():
    n = int(input())
    l_lst = list(map(int, input().split()))
    l_lst.sort()

    count = 0
    for i in range(n - 1):
        for j in range(i + 1, n):

            lst = l_lst[j + 1:]
            a = l_lst[i]
            b = l_lst[j]
            count += bisect.bisect_left(lst, a + b)

    print(count)


if __name__ == '__main__':
    main()

Fixed submission:
import bisect


def main():
    n = int(input())
    l_lst = list(map(int, input().split()))
    l_lst.sort()

    count = 0
    for i in range(n - 1):
        for j in range(i + 1, n):

            a = l_lst[i]
            b = l_lst[j]
            tmp = bisect.bisect_left(l_lst, a + b)
            tmp -= j + 1
            tmp = max(0, tmp)
            count += tmp

    print(count)


if __name__ == '__main__':
    main()

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


def main():
    n = int(input())
    l_lst = list(map(int, input().split()))
    l_lst.sort()

    count = 0
    for i in range(n - 1):
        for j in range(i + 1, n):

            lst = l_lst[j + 1:]
            a = l_lst[i]
            b = l_lst[j]
            count += bisect.bisect(lst, a + b - 1)

    print(count)


if __name__ == '__main__':
    main()

Fixed submission:
import bisect


def main():
    n = int(input())
    l_lst = list(map(int, input().split()))
    l_lst.sort()

    count = 0
    for i in range(n - 1):
        for j in range(i + 1, n):

            a = l_lst[i]
            b = l_lst[j]
            tmp = bisect.bisect_left(l_lst, a + b)
            tmp -= j + 1
            tmp = max(0, tmp)
            count += tmp

    print(count)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_lst = list(map(int,input().split()))
seq_lst = []

for i in range(n):
    for j in range(n):
        if a_lst[j]==i+1:
            seq_lst.append(j+1)
            break

for i in range(n):
    print(seq_lst[i],end=' ')

Fixed submission:
n = int(input())
a_lst = list(map(int,input().split()))
seq_lst = [0]*n

for i in range(n):
    seq = a_lst[i]
    seq_lst[seq-1] = i+1

for i in range(n):
    print(seq_lst[i], end=' ')