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

A, B, C, D = map(int, input().split())


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


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))

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


def gcd(x, y):
    while x % y > 0:
        x, y = y, x % y
    return y


def lcm(x, y):
    return (x * y) // gcd(x, y)


num1 = B // C - (A - 1) // C
num2 = B // D - (A - 1) // D
num3 = B // lcm(C, D) - (A - 1) // lcm(C, D)


print(B - A + 1 - (num1 + num2 - num3))

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

A, B, C, D = map(int, input().split())


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


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))

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


def gcd(x, y):
    while x % y > 0:
        x, y = y, x % y
    return y


def lcm(x, y):
    return (x * y) // gcd(x, y)


num1 = B // C - (A - 1) // C
num2 = B // D - (A - 1) // D
num3 = B // lcm(C, D) - (A - 1) // lcm(C, D)


print(B - A + 1 - (num1 + num2 - num3))

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

A, B, C, D = map(int, input().split())


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


num1 = math.floor(B / C) - math.floor((A - 1) / C)
num2 = math.floor(B / D) - math.floor((A - 1) / D)
num3 = math.floor(B / lcm(C, D)) - math.floor((A - 1) / lcm(C, D))


print(B - A + 1 - (num1 + num2 - num3))

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


def gcd(x, y):
    while x % y > 0:
        x, y = y, x % y
    return y


def lcm(x, y):
    return (x * y) // gcd(x, y)


num1 = B // C - (A - 1) // C
num2 = B // D - (A - 1) // D
num3 = B // lcm(C, D) - (A - 1) // lcm(C, D)


print(B - A + 1 - (num1 + num2 - num3))
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
campus = list(input() for i in range(W))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')



Fixed submission:
H, W = map(int, input().split())
campus = list(input() for i in range(H))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
campus = list(input() for i in range(W))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')


Fixed submission:
H, W = map(int, input().split())
campus = list(input() for i in range(H))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

power = 1
for i in range(1, N + 1):
    power *= i
print(power % (10**9 + 7))


Fixed submission:
import math
N = int(input())

print(math.factorial(N) % (10 ** 9 + 7))
Buggy python submission (verdict: Time Limit Exceeded):
S = input()


def reverse(rep, target):
    for i in range(0, len(target)):
        if target[i] == rep:
            break
        target = target[:i] + rep + target[i + 1:]
    return target


cnt = 0

while not len(S) == S.count('W') and not len(S) == S.count('B'):
    if S[0] == 'B':
        S = reverse('W', S)
        S = 'W' + S
    else:
        S = reverse('B', S)
        S = 'B' + S

    cnt += 1

print(cnt)


Fixed submission:
S = input()

cnt = 0
for i in range(1, len(S)):
    if not S[i - 1] == S[i]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
s = input()

for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)

Fixed submission:
s = input()

pos = s.find('B')
while pos > -1:
    if pos == 0:
        s = s[1:]
    elif pos == len(s) - 1:
        s = s[0:pos - 1]
    else:
        s = s[0:pos - 1] + s[pos + 1:]
    pos = s.find('B')
print(s)

Buggy python submission (verdict: Runtime Error):
for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)

Fixed submission:
s = input()

pos = s.find('B')
while pos > -1:
    if pos == 0:
        s = s[1:]
    elif pos == len(s) - 1:
        s = s[0:pos - 1]
    else:
        s = s[0:pos - 1] + s[pos + 1:]
    pos = s.find('B')
print(s)
Buggy python submission (verdict: Runtime Error):
i = int(input())
list = []

if i % 2 == 0:
    for m in range(2, int((i+2)/2) + 1):
        if i % m == 0:
            list.append(m + i / m)

if i % 2 == 1:
    for m in range(1, int((i+1)/2), 2):
        if i % m == 0:
            list.append(m + i / m)


list.sort()
print(int(list[0]-2))


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

if i[0] <= 9:
    if i[1] <= 9:
        print(i[0] * i[1])
    else:
        print('-1')

else:
    print('-1')
Buggy python submission (verdict: Runtime Error):
n = int(input())

ls = list(map(int, input().split()))
 
count = 0

for i in range(n-2):
    if a[i-1] < a[i] and a[i+1] > a[i]:
        count+=1
    else:
        if a[i-1] > a[i] and a[i+1] < a[i]:
            count += 1

print count

Fixed submission:
n = int(input())

ls = list(map(int, input().split()))
 
count = 0

for i in range(1,n-1):
    if ls[i-1] < ls[i] and ls[i+1] > ls[i]:
        count+=1
    elif ls[i-1] > ls[i] and ls[i+1] < ls[i]:
            count += 1

print(str(count))
Buggy python submission (verdict: Runtime Error):
N = input()


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

ls_sorted = sorted(ls)

K = ls_sorted[N//2] - ls_sorted[N//2 - 1]

print(K)

Fixed submission:
N = int(input())


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

ls.sort()

K = ls[N//2] - ls[N//2 - 1]

print(int(K))

Buggy python submission (verdict: Runtime Error):
N = input()

if N/2 %2 != 0:
    print(0)

else:
    ls = list(map(int, input().split()))

    ls_sorted = sorted(ls)

    K = ls_sorted[N/2] - ls_sorted[N/2 - 1]

    print(K)

Fixed submission:
N = int(input())


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

ls.sort()

K = ls[N//2] - ls[N//2 - 1]

print(int(K))

Buggy python submission (verdict: Runtime Error):
N = input()

if N/2 %2 != 0:
    print '0'

else:
    ls = list(map(int, input().split()))

    ls_sorted = sorted(ls)

    K = ls_sorted[N/2] - ls_sorted[N/2 - 1]

    print(K)

Fixed submission:
N = int(input())


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

ls.sort()

K = ls[N//2] - ls[N//2 - 1]

print(int(K))
Buggy python submission (verdict: Runtime Error):
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0
for city1 in list1[:4]:
    for city2 in list1[:4]:
        if city1 - city2 > list[5] | city2 - city1 > list[5]:
            print ':('
            count += 1
            break
if count = 0:
    print 'Yay!'


Fixed submission:
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0

for city1 in list1[:5]:
    for city2 in list1[:5]:
        if (city1 - city2 > list1[5] or city2 - city1 > list1[5]):
            print ':('
            count += 1
            break
    if count != 0:
        break
if count == 0:
    print 'Yay!'
Buggy python submission (verdict: Runtime Error):
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)

time = time - 10 + min(list2)
print int(time)


Fixed submission:
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)


if list2 != []:
    time = time - 10 + min(list2)
    print int(time)
else:
    print int(time)

Buggy python submission (verdict: Runtime Error):
# coding = utf-8
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)

time = time -10 + min(list2)
print int(time)


Fixed submission:
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)


if list2 != []:
    time = time - 10 + min(list2)
    print int(time)
else:
    print int(time)

Buggy python submission (verdict: Runtime Error):
# coding = utf-8
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q + 10
    if mod != 0:
        list2.append(mod)

time = time -10 + min(list2)
print int(time)


Fixed submission:
list1 = []
list2 = []

time = 0
for n in range(5):

    list1.append(int(input()))

for n in list1:
    q = n // 10
    mod = n % 10
    time += 10 * q
    if mod != 0:
        time += 10
        list2.append(mod)


if list2 != []:
    time = time - 10 + min(list2)
    print int(time)
else:
    print int(time)
Buggy python submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

list_S2 = list_S

for char in list_S:
    number = 0
    list_S2.remove(char)

    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        number += 1
        for n in list_S2:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break
    else:
        list_number.append(0)


print int(max(list_number))


Fixed submission:
# coding: utf-8
str_S = raw_input()

list_S = list(str_S)
list = list(str_S)

list_number = []

while list != []:
    number = 0
    for char in list:
        if char == 'A' or char == 'C' or char == 'G' or char == 'T':
            number += 1
        else:
            break
    list_number.append(number)

    for n in range(number + 1):
        if list != []:
            list.pop(0)

print max(list_number)

Buggy python submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

list_S2 = list_S

for char in list_S:
    number = 0
    list_S2.remove(char)

    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        number += 1
        for n in list_S2:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break


print int(max(list_number))


Fixed submission:
# coding: utf-8
str_S = raw_input()

list_S = list(str_S)
list = list(str_S)

list_number = []

while list != []:
    number = 0
    for char in list:
        if char == 'A' or char == 'C' or char == 'G' or char == 'T':
            number += 1
        else:
            break
    list_number.append(number)

    for n in range(number + 1):
        if list != []:
            list.pop(0)

print max(list_number)

Buggy python submission (verdict: Runtime Error):
str_S = raw_input()

list_S = list(str_S)

list_str = []
list_number = []

for char in list_S:
    number = 0
    if char == 'A' or char == 'C' or char == 'T' or char == 'G':
        index = list_S.index(char) + 1
        number += 1
        for n in list_S[index:]:
            if n == 'A' or n == 'C' or n == 'T' or n == 'G':
                char += n
                number += 1
            else:
                list_str.append(char)
                list_number.append(number)
                break


print int(max(list_number))


Fixed submission:
# coding: utf-8
str_S = raw_input()

list_S = list(str_S)
list = list(str_S)

list_number = []

while list != []:
    number = 0
    for char in list:
        if char == 'A' or char == 'C' or char == 'G' or char == 'T':
            number += 1
        else:
            break
    list_number.append(number)

    for n in range(number + 1):
        if list != []:
            list.pop(0)

print max(list_number)
Buggy python submission (verdict: Runtime Error):
HW = raw_input().split()
hw = raw_input().split()

printint(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))


Fixed submission:
HW = raw_input().split()
hw = raw_input().split()

print(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))

Buggy python submission (verdict: Runtime Error):
HW = raw_input().split()
hw = raw_input().split()

print HW[0] * HW[1] - hw[0] * HW[1] - hw[1] * HW[0] + hw[0] * hw[1]


Fixed submission:
HW = raw_input().split()
hw = raw_input().split()

print(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))
Buggy python submission (verdict: Runtime Error):
list = raw_input().split()

A = int(list[0])

B = int(list[1])

c = int(list[2])

if B // A < C:
    print B // A

else:
    print C


Fixed submission:
list = raw_input().split()

A = int(list[0])

B = int(list[1])

C = int(list[2])

if B // A < C:
    print B // A

else:
    print C

Buggy python submission (verdict: Runtime Error):
list = raw_input().split()

A = list[0]

B = list[1]

c = list[2]

if B // A < C:
    print B // A

else:
    print C


Fixed submission:
list = raw_input().split()

A = int(list[0])

B = int(list[1])

C = int(list[2])

if B // A < C:
    print B // A

else:
    print C
Buggy python submission (verdict: Time Limit Exceeded):
S = raw_input()
S = str(S)

counter = 0


while True:
    killer = 0

    killer += int(S.count('10'))
    S = S.replace('10','')

    killer += int(S.count('01'))
    S = S.replace('01','')

    counter += int(killer)

    if killer == 0:
        break
print counter * 2


Fixed submission:
S = raw_input()
S = str(S)

S_1 = int(S.count('1'))
S_0 = int(S.count('0'))

if S_1 > S_0:
    print S_0 * 2
else:
    print S_1 * 2
Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(input())
if (n>0 or n<10) and (m>0 or m<10):
    print(n*m)
else:
    print("-1")

Fixed submission:
m = input()
n = m.split(" ")
if (int(n[0])<=9 and int(n[1])<=9):
    print(int(n[0])*int(n[1]))
else:
    print("-1")
Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(input())
if (n<=9 and m<=9):
    print(n*m)
else:
    print("-1")

Fixed submission:
import math
m = int(input())
k = 0
for i in range(1,10,1):
    for j in range(1,10,1):
        if i*j == m:
            k = 1
            break
if k == 1:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A,B = zip(int(),input().split())
if A<10 && B<10:
  ans = A * B
else:
  ans = -1
print(ans)

Fixed submission:
A,B = map(int,input().split())
if A<10 and B<10:
  ans = A * B
else:
  ans = -1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = [int(a) for a in input().split()]
ans = 0
for i in range(N):
  if h[i] >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = [int(a) for a in input().split]
ans = 0
for i in range(N):
  if h[i] >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
h = str(input())
ans = 0
for i in range(N):
  if int(h.split()[i]) >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  h = int(input())
  if h >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  if int(input()) >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
K = int(input())
ans = 0
for i in range(N):
  if input() >= K:
    ans += 1
    
print(ans)

Fixed submission:
NK = [int(a) for a in input().split()]
h = [int(a) for a in input().split()]
ans = 0
for i in range(NK[0]):
  if h[i] >= NK[1]:
    ans += 1
    
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
inputInInt = int(S)
sum = 0
for i in range(S):
    sum += S[i]

if inputInInt % sum is 0:
    print('YES')
else:
    print('No')


Fixed submission:
S = input()
inputInInt = int(S)
sum = 0
for i, v in enumerate(S):
    sum += int(v)

if inputInInt % sum is 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
flg = False
for i in range(2, sq):
    if n % i == 0:
        flg = True
        break
if flg:
    print(sq * 2 - 1)
else:
    print(n - 1)


Fixed submission:
a, b = map(int, input().split())
if a > 9 or b > 9:
    print("-1")
else:
    print(a * b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n > 81:
    print("No")
else:
    is_ok = False
    for x in range(1, 10):
        if n % x == 0 and n // x <= 9:
            is_ok = True
            break

if is_ok:
    print("Yes")
else:
    print("No")


Fixed submission:
n = int(input())
if n > 81:
    print("No")
else:
    is_ok = False
    for x in range(1, 10):
        if n % x == 0 and n // x <= 9:
            is_ok = True
            break
    if is_ok:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(sys.stdin.readline())
alist = [int(x) for x in sys.stdin.readline().split()]
attends = [alist.index(y) + 1 for y in sorted(alist)]
print(*attends)


Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
alist = [int(x) for x in input().split()]
attends = [alist.index(y) + 1 for y in sorted(alist)]
print(*attends)


Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
alist = [int(x) for x in input().split()]
attends = [alist.index(y) + 1 for y in range(1, n + 1)]
print(*attends)


Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
alist = list(map(int, input().split()))
attends = [alist.index(x) + 1 for x in range(1, n + 1)]
print(*attends)

Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
attends = [int(x) for x in input().split()]
arr = []
for x in range(1, n + 1):
    arr.append(attends.index(x) + 1)
print(*arr)


Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
attends = [int(x) for x in input().split()]
for x in range(1, n + 1):
    print(attends.index(x) + 1)


Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
attends = list(map(int, input().split()))
for x in range(1, n + 1):
    print(attends.index(x) + 1)

Fixed submission:
n = int(input())
attends = dict(enumerate(list(map(int, input().split())), start=1))
attends_sorted = sorted(attends.items(), key=lambda x: x[1])
arr = [x[0] for x in attends_sorted]
print(*arr)