Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())

def solve(a,b,c,k):
  s = 0
  while k > 0:
    if a > 0:
      a -= 1
      s += 1
      k -= 1
    elif b > 0:
      b -= 1
      k -= 1
    else:
      c -= 1
      s -= 1
      k -= 1

  return s
    
print(solve(A,B,C,K))

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

def solve(a,b,c,k):
  if a >= k:
    return k
  elif a + b >= k:
    return a
  else:
    return a-(k-a-b)
    
print(solve(A,B,C,K))

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

def solve(a,b,c,k):
  s = 0
  while k > 0:
    if a > 0:
      a -= 1
      s += 1
      k -= 1
    elif b > 0:
      b -= 1
      k -= 1
    else:
      c -= 1
      s -= 1
      k -= 1

  return s
    
print(solve(A,B,C,K))

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

def solve(a,b,c,k):
  if a >= k:
    return k
  elif a + b >= k:
    return a
  else:
    return a-(k-a-b)
    
print(solve(A,B,C,K))

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)

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

def take_card(a,b,c,k,s=0):
  if k<=0:
    return s
  else:
    if a > 0:
      return take_card(a-1,b,c,k-1,s+1)
    elif b > 0:
      return take_card(a,b-1,c,k-1,s)
    else:
      return take_card(a,b,c-1,k-1,s-1)
    
print(take_card(A,B,C,K))

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

def solve(a,b,c,k):
  if a >= k:
    return k
  elif a + b >= k:
    return a
  else:
    return a-(k-a-b)
    
print(solve(A,B,C,K))
Buggy python submission (verdict: Runtime Error):
X = int(input())

l = range(-10**3:10**3)

for i in l:
  for j in l:
    if i**5 - j**5 == X:
      print("i" + " " + "j")
      exit()

Fixed submission:
X = int(input())

l = range(-10**3,10**3)

for i in l:
  for j in l:
    if i**5 - j**5 == X:
      print(str(i) + " " + str(j))
      exit()
Buggy python submission (verdict: Runtime Error):
A, B, N = map(int,input().split())

x = N
for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()

    
print("0")


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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()

    
print(0)

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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()


print(0)

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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()

print(0)

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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()

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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for x in reversed(range(1,N+1)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()


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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for x in reversed(range(N)):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()


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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for i in range(N):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()
  else:
    x -= 1


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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")

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

x = N
for i in range(N):
  if x % B != 0:
    print(int(A*x/B)-A*int(x/B))
    exit()


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

for i in range(A,B+1):
  if i % K == 0:
    print("OK")
    exit()
    
print("NG")
Buggy python submission (verdict: Runtime Error):
A, B, N = map(int,input().split())

max - int(a*min(B-1,N)/B)
print(max)
~             

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

max = int(A*min(B-1,N)/B)
print(max)
Buggy python submission (verdict: Time Limit Exceeded):
from math import *

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd((i+1),gcd((j+1),(k+1)))

print(sum)


Fixed submission:
from math import *

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd((i+1),gcd((j+1),(k+1)))

print(sum)

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

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd(i,gcd(j,k))

print(sum)
return

Fixed submission:
from math import *

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd((i+1),gcd((j+1),(k+1)))

print(sum)
Buggy python submission (verdict: Runtime Error):
x,y,z = map(int,input().split())
l = []

l[0] = z
l[1] = x
l[2] = y

print(l)


Fixed submission:
x,y,z = map(int,input().split())
l = []

l.append(z)
l.append(x)
l.append(y)

print(*l)

Buggy python submission (verdict: Runtime Error):
x,y,z = list(map(int,input().split()))
l = []

l[0] = z
l[1] = x
l[2] = y

print(l)


Fixed submission:
x,y,z = map(int,input().split())
l = []

l.append(z)
l.append(x)
l.append(y)

print(*l)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)

s = sum(a)

if a[M-1] >= s/4M:
  print("Yes")
else:
  print("No")
  
return

Fixed submission:
N,M = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
a
s = sum(a)

if a[M-1] >= s/(4*M):
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)

s = sum(a)

if a[M-1] / s >= 1/4M:
  print("Yes")
else:
  print("No")
  
return

Fixed submission:
N,M = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
a
s = sum(a)

if a[M-1] >= s/(4*M):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**7)

N,K = map(int,input().split())

def solve(n,k):
  cand = abs(n-k)
  if n <= cand:
    return n
  else:
    return solve(cand,k)

print(solve(N,K))

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

if N % K == 0:
  print(0)
else:
  q = N // K
  d = N - K*q
  print(min(d,abs(d-K)))

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())

def solve(n,k):
  cand = abs(n-k)
  if n <= cand:
    return n
  else:
    return solve(cand,k)

print(solve(N,K))

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

if N % K == 0:
  print(0)
else:
  q = N // K
  d = N - K*q
  print(min(d,abs(d-K)))

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


while abs(N-K) < N:
  N = abs(N-K)
  
print(N)

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

if N % K == 0:
  print(0)
else:
  q = N // K
  d = N - K*q
  print(min(d,abs(d-K)))

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


while abs(N-K) > N:
  N = abs(N-K)
  
print(N)

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

if N % K == 0:
  print(0)
else:
  q = N // K
  d = N - K*q
  print(min(d,abs(d-K)))
Buggy python submission (verdict: Runtime Error):
S = input()

def judge(x):
  if "".join(list(reversed(x))) == x:
    return True
  else:
    return False
  
def solve(x):
  if judge(x) and judge(x[0:(len(x)-1)/2]) and judge(x[(len(x)+1)/2:]):
    print("Yes")
  else:
    print("No")
    
    
solve(S)

Fixed submission:
S = input()

def judge(x):
  if "".join(list(reversed(x))) == x:
    return True
  else:
    return False
  
def solve(x):
  if judge(x) and judge(x[0:int((len(x)-1)/2)]) and judge(x[int((len(x)+1)/2):]):
    print("Yes")
  else:
    print("No")
    
    
solve(S)
Buggy python submission (verdict: Runtime Error):
N = int(input())
l = [input() for _ in range(N)]
m = set(l)
d = dict()

for name in m:
  d[name] = l.count(name)
  
max_in_d = max(d_values())
max_kv_list = sorted([kv[0] for kv in d.items() if kv[1] == max_in_d])
for name in max_kv_list:
  print(name)

Fixed submission:
l = set(map(int,input().split()))
if len(l) == 2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = [input() for _ in range(N)]
m = set(l)
d = dict()

for name in m:
  d[name] = l.count(name)
  
max_in_d = max(d.values())
max_kv_list = sorted([kv[0] for kv in d.items() if kv[1] == max_in_d])
for name in max_kv_list:
  print(name)


Fixed submission:
#!/usr/bin/env python3
from collections import Counter

def solve(l):
    d = Counter(l)
    d_max = max(d.values())
    max_d_list = sorted([k[0] for k in d.items() if k[1] == d_max])
    return max_d_list



def main():
    N = int(input())
    l = [input() for _ in range(N)]
    d = solve(l)
    for a in d:
        print(a)
    return

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = [input() for _ in range(N)]
m = set(l)
d = dict()

for name in m:
  d[name] = l.count(name)
  

max_kv_list = sorted([kv[0] for kv in d.items() if kv[1] == max(d.values())])
for name in max_kv_list:
  print(name)

Fixed submission:
#!/usr/bin/env python3
from collections import Counter

def solve(l):
    d = Counter(l)
    d_max = max(d.values())
    max_d_list = sorted([k[0] for k in d.items() if k[1] == d_max])
    return max_d_list



def main():
    N = int(input())
    l = [input() for _ in range(N)]
    d = solve(l)
    for a in d:
        print(a)
    return

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = [input() for _ in range(N)]
m = set(l)
d = dict()

for name in m:
  d[name] = l.count(name)
  
  
max_kv_list = sorted([kv[0] for kv in d.items() if kv[1] == max(d.values())])
for name in max_kv_list:
  print(name)

Fixed submission:
#!/usr/bin/env python3
from collections import Counter

def solve(l):
    d = Counter(l)
    d_max = max(d.values())
    max_d_list = sorted([k[0] for k in d.items() if k[1] == d_max])
    return max_d_list



def main():
    N = int(input())
    l = [input() for _ in range(N)]
    d = solve(l)
    for a in d:
        print(a)
    return

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
xs = set(map(int,input().split()))

if lrn(cs) == n:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
xs = set(map(int,input().split()))

if len(xs) == n:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int,input().split()))

ans=1
for i in range(1,N):
  p_prev = sorted(p[0:i])
  if p[i] < p_prev[0]:
    ans += 1
    
print(ans)

Fixed submission:
a,b=map(int,input().split())

bg=max(a,b)
sm=min(a,b)

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

a = [min(p[:i+1]) for i in range(N)]
ans = 0
for i in range(N):
  if p[i] == a[i]:
    ans += 1
    
print(ans)

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

ans = 0
p_min = N + 1
for i in range(N):
  p_min = min(p_min,p[i])
  if p_min == p[i]:
    ans += 1
    
print(ans)

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

ans=1
for i in range(1,N):
  p_min = min(p[0:i])
  if p[i] < p_min:
    ans += 1
    
print(ans)

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

ans = 0
p_min = N + 1
for i in range(N):
  p_min = min(p_min,p[i])
  if p_min == p[i]:
    ans += 1
    
print(ans)

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

ans=1
for i in range(1,N):
  p_prev = sorted(p[0:i])
  if p[i] < p_prev[0]:
    ans += 1
    
print(ans)

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

ans = 0
p_min = N + 1
for i in range(N):
  p_min = min(p_min,p[i])
  if p_min == p[i]:
    ans += 1
    
print(ans)

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

ans=1
for i in range(1,N):
  p_prev = sorted(p[0:i])
  if p[i] < p_prev[0]:
    ans += 1
    
print(ans)

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

ans = 0
p_min = N + 1
for i in range(N):
  p_min = min(p_min,p[i])
  if p_min == p[i]:
    ans += 1
    
print(ans)
Buggy python submission (verdict: Runtime Error):
N,K,M=map(int,input().split())
a=list(map(int,input().split()))

min = N*M - sum(a)

ans = -1

if 0 <= min <= K:
  ans = min
elif min < 0:
  ans = 0
  
print(ans)

Fixed submission:
C = input()
print(chr(ord(C)+1))
Buggy python submission (verdict: Runtime Error):
import math
import sys
sys.setrecursionlimit(100000)

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())

def findPrime(x):
  if is_Prime(x):
    return x
  else:
    return findPrime(x+1)

print(findPrime(X))

Fixed submission:
import math
import sys
sys.setrecursionlimit(100000)

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())

def findPrime(x):
  if is_prime(x):
    return x
  else:
    return findPrime(x+1)

print(findPrime(X))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(1000000)

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

    
def findBrick(n,a,counter=0):
  if len(a) == 0:
    return counter
  elif a[0] == counter + 1:
    return findBrick(n,a[1:],counter+1)
  else:
    return findBrick(n,a[1:],counter)

c = findBrick(N,a)
  
ans = -1 if c == 0 else N - c
print(ans)

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

counter = 0
for i in range(N):
  if a[i] == counter+1:
    counter += 1

ans = -1 if counter == 0 else N - counter
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))

def solve(l, K=0):
  if K+1 in l:
    pos = l.index(K+1)
    return solve(l[pos:],K+1)
  else:
    return K
  
def judge(x):
  if x == 0:
    return -1
  else:
    return N-x


print(judge(solve(a)))


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

counter = 0
for i in range(N):
  if a[i] == counter+1:
    counter += 1

ans = -1 if counter == 0 else N - counter
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))

def solve(l, K=0):
  if K+1 in l:
    pos = l.index(K+1)
    return solve(l[pos:],K+1)
  else:
    return K
  
def judge(x):
  if x == 0:
    return -1
  else:
    return N-x


print(judge(solve(a)))


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

counter = 0
for i in range(N):
  if a[i] == counter+1:
    counter += 1

ans = -1 if counter == 0 else N - counter
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def solve(s):
    s = str(s)
    c = 0
    for i in range(1000):
        v = [i//100, i//10%10, i%10]
        f = 0
        for j in range(len(s)):
            if int(s[j]) == v[f]:
                f += 1
            if f == 3:
                break
        if f == 3:
            c += 1
    return c

def main():
    N = int(input())
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin/env python3

def solve(s):
    s = str(s)
    c = 0
    for i in range(1000):
        v = [i//100, i//10%10, i%10]
        f = 0
        for j in range(len(s)):
            if int(s[j]) == v[f]:
                f += 1
            if f == 3:
                break
        if f == 3:
            c += 1
    return c

def main():
    N = int(input())
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

def solve(s):
    s = str(s)
    a = list(range(10**3))
    c = [0]*1000
    for i in range(len(s)-2):
        for j in range(i+1,len(s)-1):
            for k in range(j+1,len(s)):
                d = int(s[i] + s[j] + s[k])
                if d in a:
                    c[d] = 1
    return sum(c)

def main():
    N = int(input())
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()

Fixed submission:
#!/usr/bin/env python3

def solve(s):
    s = str(s)
    c = 0
    for i in range(1000):
        v = [i//100, i//10%10, i%10]
        f = 0
        for j in range(len(s)):
            if int(s[j]) == v[f]:
                f += 1
            if f == 3:
                break
        if f == 3:
            c += 1
    return c

def main():
    N = int(input())
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
from collections import Counter
MOD = 998244353


def solve(n,d):
    if d[0] != 0:
        return 0
    dc = Counter(d)
    if dc[0] > 1:
        return 0
    res = 1
    k = 1
    while k <= max(d):
        res *= dc[k-1]**dc[k]
        res %= MOD
        k += 1
    return res


def main():
    N = int(input())
    d = list(map(int,input().split()))
    # N,M = map(int,input().split())
    print(solve(N,d))


if __name__ == '__main__':
  main()


Fixed submission:
#!/usr/bin/env python3
from collections import Counter
MOD = 998244353


def solve(n,d):
    if d[0] != 0:
        return 0
    dc = Counter(d)
    if dc[0] > 1:
        return 0
    res = 1
    k = 1
    dmax = max(d)
    while k <= dmax:
        res *= dc[k-1]**dc[k]
        res %= MOD
        k += 1
    return res


def main():
    N = int(input())
    d = list(map(int,input().split()))
    # N,M = map(int,input().split())
    print(solve(N,d))


if __name__ == '__main__':
  main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
from collections import Counter
MOD = 998244353


def solve(n,d):
    if d[0] != 0:
        return 0
    dc = Counter(d)
    if dc[0] > 1:
        return 0
    res = 1
    k = 1
    while k <= max(d):
        res *= dc[k-1]**dc[k]
        res %= MOD
        k += 1
    return res


def main():
    N = int(input())
    d = list(map(int,input().split()))
    # N,M = map(int,input().split())
    print('{}'.format(solve(N,d)))


if __name__ == '__main__':
  main()


Fixed submission:
#!/usr/bin/env python3
from collections import Counter
MOD = 998244353


def solve(n,d):
    if d[0] != 0:
        return 0
    dc = Counter(d)
    if dc[0] > 1:
        return 0
    res = 1
    k = 1
    dmax = max(d)
    while k <= dmax:
        res *= dc[k-1]**dc[k]
        res %= MOD
        k += 1
    return res


def main():
    N = int(input())
    d = list(map(int,input().split()))
    # N,M = map(int,input().split())
    print(solve(N,d))


if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(9):
  for j in range(9):
    if (i+!)*(j+1) == N:
      print("Yes")
      exit()
print("No")

Fixed submission:
N = int(input())
l = []
for i in range(1,10):
  for j in range(1,10):
    l.append(i*j)
    
if N in l:
  print("Yes")
  exit()
else:
  print("No")
  exit()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[i] = l.index(i+1)+1
  
print(*m)


Fixed submission:
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[l[i]-1] = i+1
  
print(*m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[i] = l.index(i+1)+1
  
print(*m)


Fixed submission:
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[l[i]-1] = i+1
  
print(*m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = list(map(int,input().split()))
m = []

for i in range(1,N+1):
  m.append(l.index(i)+1)
  
print(*m)


Fixed submission:
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[l[i]-1] = i+1
  
print(*m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = list(map(int,input().split()))
m = []

for i in range(1,N+1):
  m.append(l.index(i)+1)
  
print(*m)

Fixed submission:
N = int(input())
l = list(map(int,input().split()))
m = [0]*N

for i in range(N):
  m[l[i]-1] = i+1
  
print(*m)