Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=input())
if a[2] == a[3] and a[4] == a[5]:
  print("Yes")
else:
  print("No")

Fixed submission:
a=input()
if a[2] == a[3] and a[4] == a[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,p=map(int,input().split())
print((a*3+p)//2))

Fixed submission:
A, P = map(int, input().split())
print((A*3+P)//2)
Buggy python submission (verdict: Runtime Error):
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)


Fixed submission:
N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print("".join(S))

Buggy python submission (verdict: Runtime Error):
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)


Fixed submission:
N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print("".join(S))

Buggy python submission (verdict: Runtime Error):
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])

s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))


Fixed submission:
N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print("".join(S))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [input() for _ in range(N)]
T = ["".join(s) for s in zip(*S)]
 
ans = 0
for _ in range(N):
    ans += (S == T)
    S = [s[-1] + s[:-1] for s in S]
    T = T[-1:] + T[:-1]
 
print(N * ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
S = [0]*(N+1)
for n in range(N):
    S[n+1] = S[n] + A[n]
B = {}
for s in range(len(S)):
    B[S[s]] = 0
for s in range(len(S)):
    B[S[s]] += 1
res = 0
for v in B.values():
    if v > 1:
        res += v * (v - 1) // 2
print(res)
Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
if abs(x),abs(y)>pow(10,9):
    exit()
s=abs(y)-abs(x)
buttona=s
buttonb=0
if y < 0:
    buttonb+=1
if x < 0:
    buttonb+=1
print(buttona+buttonb)


Fixed submission:
x, y = map(int, input().split())
ans = 0
if x * y >= 0:
    if x > y:
        ans = x - y + 2
        if x * y == 0:
            ans = x - y + 1
    else:
        ans = abs(y - x)
else:
    ans = abs(abs(x) - abs(y)) + 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    A = [int(v) for v in input().split()]

    ans = 1
    for a in A:
        ans *= a
    
    if ans > 1e18:
        print(-1)
    else:
        print(ans)

if __name__ == '__main__':
    main()

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

def main():
    N = int(input())
    A = sorted([int(v) for v in input().split()])

    over = False
    ans = 1
    for a in A:
        ans *= a
        if ans > 1e18:
            over = True
            break
    
    if over:
        print(-1)
    else:
        print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    N = int(input()[-1])
    if N == 3:
        print("bon")
    elif N == 0 or N == 1 or N == 6 or N == 8:
        print("pon")
    else:
        print("hon")

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    N = int(input()[-1])
    if N == 3:
        print("bon")
    elif N == 0 or N == 1 or N == 6 or N == 8:
        print("pon")
    else:
        print("hon")

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

def main():
    N, M = map(int, input().split())
    V = [True] * N
    H = [int(v) for v in input().split()]
    AB = [[map(int, input().split())] for _ in range(M)]
    for ab in AB:
        a, b = ab
        a-=1
        b-=1
        # if V[a] or V[b]:
        if H[a] < H[b]:
            V[a] = False
        else:
            V[b] = False
    
    print(V.count(True))

if __name__ == '__main__':
    main()

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

def main():
    N, M = map(int, input().split())
    V = [True] * N
    H = [int(v) for v in input().split()]
    AB = [[int(v) - 1 for v in input().split()] for _ in range(M)]
    for a, b in AB:
        # if V[a] or V[b]:
        if H[a] <= H[b]:
            V[a] = False
        if H[a] >= H[b]:
            V[b] = False
    
    print(V.count(True))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    memo = []
    count = 0
    for s in sys.stdin.readlines():
        if s.rstrip() in memo:
            count += 1
        else:
            memo.append(s.rstrip())
        
    print(N - count)

if __name__ == '__main__':
    main()

Fixed submission:
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    count = 0

    memo = sorted(S)

    for i in range(N - 1):
        if memo[i] == memo[i + 1]:
            count += 1
        
    print(N - count)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    memo = []
    count = 0
    for s in S:
        if s in memo:
            count += 1
        else:
            memo.append(s)
        
    print(N - count)

if __name__ == '__main__':
    main()

Fixed submission:
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    count = 0

    memo = sorted(S)

    for i in range(N - 1):
        if memo[i] == memo[i + 1]:
            count += 1
        
    print(N - count)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    memo = []
    count = 0
    for s in S:
        if s in memo:
            count += 1
        else:
            memo.append(s)
        
    print(N - count)

if __name__ == '__main__':
    main()

Fixed submission:
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    count = 0

    memo = sorted(S)

    for i in range(N - 1):
        if memo[i] == memo[i + 1]:
            count += 1
        
    print(N - count)

if __name__ == '__main__':
    main()

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

def main():
    N = int(input())
    S = [input() for _ in range(N)]
    memo = []
    count = 0
    for s in S:
        if s in memo:
            count += 1
        else:
            memo.append(s)
        
    print(N - count)

if __name__ == '__main__':
    main()

Fixed submission:
import sys, itertools
input = sys.stdin.readline

def main():
    N = int(input())
    S = [s.rstrip() for s in sys.stdin.readlines()]
    count = 0

    memo = sorted(S)

    for i in range(N - 1):
        if memo[i] == memo[i + 1]:
            count += 1
        
    print(N - count)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
input = stdin.readline
import math

memo = [[0] * 201 for _ in range(201)]

def sgcd(i, j):
    if memo[i][j] == 0:
        memo[i][j] = math.gcd(i, j)
    return memo[i][j]

def main():
    N = int(input())
    ans = 0
    for i in range(1, N + 1):
        for j in range(1, N + 1):
            for k in range(1, N + 1):
                ans += sgcd(sgcd(i, j), k)
    print(ans)


if __name__ == '__main__':
    main()

Fixed submission:
from sys import stdin
input = stdin.readline
import math

memo = [[0] * 201 for _ in range(201)]

def sgcd(i, j):
    if memo[i][j] == 0:
        memo[i][j] = math.gcd(i, j)
    return memo[i][j]

def main():
    N = int(input())
    ans = 0
    for i in range(1, N + 1):
        for j in range(1, N + 1):
            a = sgcd(i, j)
            for k in range(1, N + 1):
                ans += sgcd(a, k)
    print(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
s = list(input())
print(s)
if s[2] == s[3] && s[4] == s[5]:
  print("Yes")
else:
  print("No")

Fixed submission:
s = list(input())
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
from sys import stdin
input = stdin.readlines
import math

def main():
    N = int(input())
    p = [list(map(int, input().split())) for _ in range(N)]
    s = 0.0
    for i in range(N - 1):
        for j in range(i + 1, N):
            s += math.sqrt((p[i][0] - p[j][0])**2 + (p[i][1] - p[j][1])**2)
    print(s*2/N)

if __name__ == '__main__':
    main()

Fixed submission:
import numpy as np
import itertools
N = int(input())
p = [list(map(int,input().split())) for _ in range(N)]
print(sum(np.sqrt((p[i][0] - p[j][0])**2 + (p[i][1] - p[j][1])**2) for i, j in itertools.combinations(range(N), 2)) * np.math.factorial(N - 1) * 2 / np.math.factorial(N))
Buggy python submission (verdict: Runtime Error):
x=int(input())
print(1000*(n//500) + 5*((n//500)//5))

Fixed submission:
n=int(input())
print(1000*(n//500) + 5*((n%500)//5))
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
x=n//(a+b)
y=n - C1*(a+b)
if y >= a:
  y=a
print(a*x+y)

Fixed submission:
n,a,b = map(int,input().split())
x=n//(a+b)
y=n - x*(a+b)
if y >= a:
  y=a
print(a*x+y)

Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
x=n//(a+b)
y=n - x*(a+b)
if y >= a
    y=a
print(a*y+x)

Fixed submission:
n,a,b = map(int,input().split())
x=n//(a+b)
y=n - x*(a+b)
if y >= a:
  y=a
print(a*x+y)
Buggy python submission (verdict: Runtime Error):
s,t=intput().split()
print(t+s)

Fixed submission:
s,t=input().split()
print(t+s)
Buggy python submission (verdict: Runtime Error):
a,b,k=(map(int, input().split()))
 if a>k:
  print(a-k,b)
else:
  if a+b>k:
    print(0,a+b-k)
  else:
    print(0,0)

Fixed submission:
a,b,k=(map(int, input().split()))
if a>k:
  print(a-k,b)
else:
  if a+b>k:
    print(0,a+b-k)
  else:
    print(0,0)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
 for i in range(1, 4):
    if a != i and b != i:
        print(i)

Fixed submission:
a = int(input())
b = int(input())
for i in range(1, 4):
  if a!=i and b!=i:
    print(i)
Buggy python submission (verdict: Runtime Error):
for i in range(1, int(input())+1):
	if len(str(i))%2==1:
		print(len[i])  

Fixed submission:
n = int(input())
ans = 0
for i in range(1,n+1):
    if len(str(i))%2 != 0:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split()
if n*a >= b:
  print(b)
else:
  print(n*a)

Fixed submission:
n,a,b=map(int,input().split())
if n*a >= b:
  print(b)
else:
  print(n*a)

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split)
if n*a >= b:
  print(b)
else:
  print(n*a)

Fixed submission:
n,a,b=map(int,input().split())
if n*a >= b:
  print(b)
else:
  print(n*a)
Buggy python submission (verdict: Runtime Error):
list = []
N = int(input())
for i in range(N):
  S, P = map(str, input().split())
  list.append((i+1, S, int(P)))
list = sorted(lst, key=lambda x:(x[1], -x[2]))
 
for l in list:
  print(l[0])

Fixed submission:
list = []
N = int(input())
for i in range(N):
  S, P = map(str, input().split())
  list.append((i+1, S, int(P)))
list = sorted(list, key=lambda x:(x[1], -x[2]))
 
for l in list:
  print(l[0])
Buggy python submission (verdict: Runtime Error):
S=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
  if b>0 and b<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if b>0 and b<=12:
    print("YYMM")
  else:
    print("NA")

Fixed submission:
s=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
  if b>0 and b<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if b>0 and b<=12:
    print("YYMM")
  else:
    print("NA")
Buggy python submission (verdict: Runtime Error):
a1 = input()
a2 = input()
t = 0

for i in range(len(a1)):
  if a1[i] != a2[i]:
    a += 1
    
print(a)

Fixed submission:
a1 = input()
a2 = input()
t = 0

for i in range(len(a1)):
  if a1[i] != a2[i]:
    t += 1
    
print(t)
Buggy python submission (verdict: Runtime Error):
def bs_left(lists, item):
    low, high = 0, len(lists)
    
    while (high >low ) :
        mid = (low + high)//2
        if lists[mid]  < item:
            low = mid +1
            
        else:
            high = mid
            
    return low

def bs_right(lists, item):
    low, high = 0, len(lists)
    
    while (high >low ):
        mid = (low + high)//2
        if lists[mid] > item:
            high = mid 
            
        else:
            low = mid+1
            
    return len(lists) - low
  

Code
n = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
​
count = 0
A.sort(), B.sort(), C.sort()
for b in B:
    count += (bs_left(A, b) * bs_right(C, b))
    
print(count)


Fixed submission:
def bs_left(lists, item):
    low, high = 0, len(lists)
    
    while (high >low ) :
        mid = (low + high)//2
        if lists[mid]  < item:
            low = mid +1
            
        else:
            high = mid
            
    return low

def bs_right(lists, item):
    low, high = 0, len(lists)
    
    while (high >low ):
        mid = (low + high)//2
        if lists[mid] > item:
            high = mid 
            
        else:
            low = mid+1
            
    return len(lists) - low
  
n = int(input())
A = [int(x) for x in input().split()]
B =[int(x) for x in input().split()]
C =[int(x) for x in input().split()]

count = 0
A.sort(), B.sort(), C.sort()
for b in B:
    count += (bs_left(A, b) * bs_right(C, b))
    
print(count)
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)

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

ans = gcd(*a)
print(ans) 



Fixed submission:
from fractions import gcd

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

ans = a[0]
for i in a:
    ans = gcd(i, ans)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, W = map(int, input().split())
wv = (map(int, input().split()) for _ in range(n))
dp = [0] * (W+1)

for w, v in wv:
    for j in range(W, w-1, -1):
        DP = dp[j-w] + v
        if dp[j] < DP:
            dp[j] = DP
print(dp[-1])

Fixed submission:
def dp():
    n, W = map(int, input().split())
    wv = (map(int, input().split()) for _ in range(n))
    dp = [0] * (W+1)

    for w, v in wv:
        for j in range(W, w-1, -1):
            DP = dp[j-w] + v
            if dp[j] < DP:
                dp[j] = DP
    return max(dp)
print(dp())

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n, W = map(int, input().split())
wv = []
for i in range(n):
    wv.append(list(map(int, input().split())))
dp = [0] * (W+1)

for w, v in wv:
    for j in range(W, w-1, -1):
        DP = dp[j-w] + v
        if dp[j] < DP:
            dp[j] = DP
print(dp[-1])

Fixed submission:
def dp():
    n, W = map(int, input().split())
    wv = (map(int, input().split()) for _ in range(n))
    dp = [0] * (W+1)

    for w, v in wv:
        for j in range(W, w-1, -1):
            DP = dp[j-w] + v
            if dp[j] < DP:
                dp[j] = DP
    return max(dp)
print(dp())

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n, W = map(int, input().split())
wv = []
for i in range(n):
    wv.append(list(map(int, input().split())))
dp = np.zeros(W+1, dtype=np.int64)

for w, v in wv:
    for j in range(W, w-1, -1):
        dp[j] = max(dp[j], dp[j-w]+v)
print(dp[-1])

Fixed submission:
def dp():
    n, W = map(int, input().split())
    wv = (map(int, input().split()) for _ in range(n))
    dp = [0] * (W+1)

    for w, v in wv:
        for j in range(W, w-1, -1):
            DP = dp[j-w] + v
            if dp[j] < DP:
                dp[j] = DP
    return max(dp)
print(dp())
Buggy python submission (verdict: Runtime Error):
def product(a):
  result = 1
  for i in a:
    result = result * i
  return result
def foo(a, b):
  result = 0
  for i in a:
    result = result + a/i
  return result
n = int(input())
a = list(map(int, input().split()))
numerator = product(a)
denominator = foo(a, numerator)
print(numerator/denominator)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
inv_a = [1/i for i in a]
print(round(1/sum(inv_a), 5))
Buggy python submission (verdict: Runtime Error):
n = int(input())
v = list(map(int,input().split()))
v.sort()
r = v[0]
for i in r:
  r = (r + i) / 2
print(r)

Fixed submission:
n = int(input())
v = [int(i) for i in input().split()]
v.sort()
ans = (v[0] + v[1]) / 2
for i in range(2, len(v)):
    ans = (ans + v[i]) / 2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input()) 

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

ans = 1;
for i in range(n):
  if a[i] == 0:
    print(0)
    sys.exit()
    
  ans *= a[i]
  
if (ans > 1000000000000000000):
    print(-1)
    sys.exit()
print(ans)

Fixed submission:
import sys
n = int(input()) 

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

ans = 1;
for i in range(n):
  if (a[i] == 0):
    print('0')
    sys.exit()
 
for i in range(n):
    
  ans *= a[i]
  if (ans > 1000000000000000000):
    print('-1')
    sys.exit()
  

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
H = list(map(int, input().split()))

a = [[0 for _ in range(N)] for _ in range(N)]

for i in range(M):
    A, B = map(int, input().split())
    a[A-1][B-1] = 1
    a[B-1][A-1] = 1

ans = 0


for i in range(N):
    flag = 0
    if 1 not in a[i]:
        ans += 1
    else:
        for j in range(N):
            if a[i][j] == 1:
                if H[j] >= H[i]:
                    flag = 1
                    break

        if flag == 0:
            ans += 1

print(ans)




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

a = [set() for _ in range(N)]

for i in range(M):
    A, B = map(int, input().split())
    a[A-1].add(B)
    a[B-1].add(A)

ans = 0

for i in range(N):
    flag = 0
    if a[i] == set():
        ans += 1
    else:
        for j in a[i]:
            if H[j-1] >= H[i]:
                flag = 1
                break

        if flag == 0:
            ans += 1

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

que = []

for i in range(N//(A+B)+1):
    for j in range(A):
        que.append('b')
    for j in range(B):
        que.append('r')

count = 0
for i in range(N):
    if que[i] == 'b':
        count += 1

print(count)

Fixed submission:
S = input()

if S[0] == S[1] and S[0] == S[2]:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

que = []

for i in range(N//(A+B)+1):
    for j in range(A):
        que.append('b')
    for j in range(B):
        que.append('r')

count = 0
for i in range(N):
    if que[i] == 'b':
        count += 1

print(count)

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

ans = (N // (A + B)) * A

if (N % (A + B)) > A:
    ans += A
else:
    ans += N % (A + B)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

que = []

for i in range(N//(A+B)+1):
    for j in range(A):
        que.append('b')
    for j in range(B):
        que.append('r')

count = 0
for i in range(N):
    if que[i] == 'b':
        count += 1

print(count)

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

ans = (N // (A + B)) * A

if (N % (A + B)) > A:
    ans += A
else:
    ans += N % (A + B)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
H = int(input())

i = 1
sm = 1

while 1:
    H = H // 2

    sm += 2**i
    i += 1

    if H == 1:
        break

print(sm)

Fixed submission:
H = int(input())

i = 1
sm = 1

if H == 1:
    print(1)
    exit()
else:
    while 1:
        H = H // 2
    
        sm += 2**i
        i += 1
    
        if H == 1:
            break

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

ans = 0

for i in range(N):
    count = 0
    tmp = A[i]
    for j in range(i+1):
        if tmp <= A[j]:
            count += 1
        else:
            break

    if count == i+1:
        ans += 1

print(ans)


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

minv = 10 ** 9
ans = 0

for i in P:
    if i < minv:
        ans += 1
        minv = i

print(ans)

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

ans = 0

for i in range(N):
    count = 0
    for j in range(i+1):
        if A[i] <= A[j]:
            count += 1
        else:
            break

    if count == i+1:
        ans += 1

print(ans)


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

minv = 10 ** 9
ans = 0

for i in P:
    if i < minv:
        ans += 1
        minv = i

print(ans)

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

ans = 0

for i in range(N):
    count = 0
    for j in range(i+1):
        if A[i] <= A[j]:
            count += 1

    if count == i+1:
        ans += 1

print(ans)


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

minv = 10 ** 9
ans = 0

for i in P:
    if i < minv:
        ans += 1
        minv = i

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

l = len(A)

for i in range(l):
    print(A.index(i+1)+1, end='')
    if i == l - 1:
        print()
    else:
        print(' ', end='')

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

ans = []

for i, j in enumerate(A):
    ans.append((j, i+1))

ans.sort()

for i, j in ans:
    print(j, end='')
    if i == len(ans):
        print()
    else:
        print(' ', end='')

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

for i in range(len(A)):
    print(A.index(i+1)+1, end='')
    if i == len(A) - 1:
        print()
    else:
        print(' ', end='')

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

ans = []

for i, j in enumerate(A):
    ans.append((j, i+1))

ans.sort()

for i, j in ans:
    print(j, end='')
    if i == len(ans):
        print()
    else:
        print(' ', end='')

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

for i in range(len(A)):
    print(A.index(i+1)+1, end='')
    if i == len(A) - 1:
        print()
    else:
        print(' ', end='')

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

ans = []

for i, j in enumerate(A):
    ans.append((j, i+1))

ans.sort()

for i, j in ans:
    print(j, end='')
    if i == len(ans):
        print()
    else:
        print(' ', end='')