Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
K = int(raw_input())

if K ==1:
      print(0)
else:
      print(N-K)




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


if K == 1:
      print(0)
else:
      print(N-K)

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

if K ==1:
      print(0)
else:
      print(N-K)


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


if K == 1:
      print(0)
else:
      print(N-K)
Buggy python submission (verdict: Runtime Error):
def main(f, e):
    if f==0 or e==0:
        print("NA")
        return 0
    if f <13:
        elif e < 13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if e < 13:
            print("YYMM")
        else:
            print("NA")

if __name__ == "__main__":
    S = input()

    a = int(S[:2])
    b = int(S[2:])
    main(a, b)
        


Fixed submission:
def main(f, e):
    if 0 <f <13:
        if 0<e<13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if 0<e<13:
            print("YYMM")
        else:
            print("NA")
if __name__ == "__main__":
    S = input()

    a = int(S[:2])
    b = int(S[2:])
    main(a, b)

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

f = int(S[:2])
e = int(S[2:])

if f==0 or e==0:
    print("NA")
    return 0

if f <13 and f>0:
    if e < 13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if e < 13:
        print("YYMM")

        


Fixed submission:
def main(f, e):
    if 0 <f <13:
        if 0<e<13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if 0<e<13:
            print("YYMM")
        else:
            print("NA")
if __name__ == "__main__":
    S = input()

    a = int(S[:2])
    b = int(S[2:])
    main(a, b)

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

f = int(S[:2])
e = int(S[2:])

if f==0 or e==0:
    print("NA")
    return 0

if f <13 and f>0:
    if e < 13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if e < 13:
        print("YYMM")

        


Fixed submission:
def main(f, e):
    if 0 <f <13:
        if 0<e<13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if 0<e<13:
            print("YYMM")
        else:
            print("NA")
if __name__ == "__main__":
    S = input()

    a = int(S[:2])
    b = int(S[2:])
    main(a, b)

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

f = int(S[:2])
e = int(S[2:])

if f==0 or e==0:
    print("NA")
    return 0

if f <13 and f>0:
    if e < 13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if e < 13:
        print("YYMM")

        


Fixed submission:
def main(f, e):
    if 0 <f <13:
        if 0<e<13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if 0<e<13:
            print("YYMM")
        else:
            print("NA")
if __name__ == "__main__":
    S = input()

    a = int(S[:2])
    b = int(S[2:])
    main(a, b)
Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
S = list(raw_input())


hoge = S[K-1]

for i in range(N):
      if S[i] != hoge:
            S[i] = "*"

print("".join(S))



Fixed submission:
N = int(raw_input())
S = list(raw_input())
K = int(raw_input())

hoge = S[K-1]

for i in range(N):

      if S[i] != hoge:
            S[i] = "*"

print("".join(S))
Buggy python submission (verdict: Runtime Error):
#N, *a = map(int, open(0).read().split())
def main():
    N = int(input())
    a=[]
    for i in range(N):
        a.append(int(input()))

    b = [0 for _ in range(N+1)]
    cnt = 1
    ans = 0
    flag = 1
    i = 0
    for i in reversed(range(N)):
        if b[a[i]+1] > 0:
            b[a[i]] = b[a[i]+1] + 1
        else:
            b[a[i]] = 1
        
    return N-max(b)
print(main())


Fixed submission:
#N, *a = map(int, open(0).read().split())
def main():
    N = int(input())
    a=[]
    for i in range(N):
        a.append(int(input()))

    b = [0 for _ in range(N+2)]
    cnt = 1
    ans = 0
    flag = 1
    i = 0
    for i in reversed(range(N)):
        if b[a[i]+1] > 0:
            b[a[i]] = b[a[i]+1] + 1
        else:
            b[a[i]] = 1
        
    return N-max(b)
print(main())

Buggy python submission (verdict: Time Limit Exceeded):
#N, *a = map(int, open(0).read().split())
def main():
    N = int(input())
    a=[]
    for i in range(N):
        a.append(int(input()))

    b = [1 for _ in range(N+1)]
    cnt = 1
    ans = 0
    flag = 1
    i = 0
    for i in reversed(range(N)):
        if a[i] + 1 in a[i:]:
            b[a[i]] = b[a[i]+1] + 1
        
        
    return N-max(b)
print(main())


Fixed submission:
#N, *a = map(int, open(0).read().split())
def main():
    N = int(input())
    a=[]
    for i in range(N):
        a.append(int(input()))

    b = [0 for _ in range(N+2)]
    cnt = 1
    ans = 0
    flag = 1
    i = 0
    for i in reversed(range(N)):
        if b[a[i]+1] > 0:
            b[a[i]] = b[a[i]+1] + 1
        else:
            b[a[i]] = 1
        
    return N-max(b)
print(main())
Buggy python submission (verdict: Runtime Error):
H,W,A,B = map(int, input().split())
MOD = 10 ** 9 + 7

N = H+W+1

def power(base, num):
    if num == 0:
        return 1
    elif num % 2==0:
        return power(base, num//2) **2 % MOD
    elif num==1:
        return base % MOD
    else:
        return power(base, num//2) **2 * base % MOD

fact = [0 for i in range(N)]
inv_fact = [0 for i in range(N)]

fact[0] = 1
for i in range(1, N):
    fact[i] = fact[i-1] * i % MOD
    
inv_fact[H+W] = power(fact[H+W], MOD-2)
for i in range(1, N):
    inv_fact[N-1-i] = inv_fact[N-i] * (N-i) % MOD

    
def comb(x,y):
    return (fact[x] * inv_fact[y])%MOD * inv_fact[x-y] % MOD

ans = 0

for i in range(1, W-B+1):
    ans += comb(H-A+B-2+i, H-A-1) * comb(A-1+W-B-i, A-1) % MOD
    ans %= MOD
print(ans%MOD)


Fixed submission:
sx, sy, tx, ty = map(int, input().split())

ans = ""
for j in range(ty-sy):
    ans += "U"
for i in range(tx-sx):
    ans += "R"
for j in range(ty-sy):
    ans += "D"
for i in range(tx-sx+1):
    ans += "L"
for j in range(ty-sy+1):
    ans += "U"
for i in range(tx-sx+1):
    ans += "R"
ans += "D"
ans += "R"
for j in range(ty-sy+1):
    ans += "D"
for i in range(tx-sx+1):
    ans += "L"
ans += "U"

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
A=map(int, raw_input().split(' '))
A.sort()
flug = 0
if N % 2 == 0:
    for i in range(N):
        if not A[i] == 2*(i/2)+1:
          N = int(raw_input())
A=map(int, raw_input().split(' '))
A.sort()
flug = 0
if N % 2 == 0:
    for i in range(N):
        if not A[i] == 2*(i/2)+1:
            print 0
            flug = 1
            break
 
else:
    for i in range(N):
        if i % 2 == 0:
            if not A[i] == i:
                print 0
                flug =1
                break
        else:
            if not A[i] == i+1:
                print 0
                flug = 1
                break
if flug == 0:
    print(pow(2, N/2))
            flug = 1
            break
 
else:
    for i in range(N):
        if i % 2 == 0:
            if not A[i] == i:
           
                flug =1
                break
        else:
            if not A[i] == i+1:
                
                flug = 1
                break
if flug == 0:
    print(pow(2, N/2))
else:
    print 0

Fixed submission:
N = int(raw_input())
A=map(int, raw_input().split(' '))
A.sort()
flug = 0
if N % 2 == 0:
    for i in range(N):
        if not A[i] == 2*(i/2)+1:
            flug = 1
            break

else:
    for i in range(N):
        if i % 2 == 0:
            if not A[i] == i:
                flug =1
                break
        else:
            if not A[i] == i+1:
                flug = 1
                break
if flug == 0:
    print(pow(2, N/2))%(pow(10,9)+7)
else:
    print 0
Buggy python submission (verdict: Runtime Error):
s = input()

while(len(s)>0):
    if s[-5:] == dream or s[-5:] == erase:
        s = s[:-5]
    elif s[-7:] == dreamer:
        s = s[:-7]
    elif  s[-6:] == eraser:
        s = s[:-6]
    else:
        s = ""
if len(s) > 0:
    print("Yes")
else:    
    print("No")


Fixed submission:
s = input()

ans = 1
while(len(s)>0):
    if s[-5:] == "dream" or s[-5:] == "erase":
        s = s[:-5]
    elif s[-7:] == "dreamer":
        s = s[:-7]
    elif  s[-6:] == "eraser":
        s = s[:-6]
    else:
        s = ""
        ans = 0
if ans > 0:
    print("YES")
else:    
    print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c = raw_input().split()

A = {a:1,b:1,c:1}
print len(A)


Fixed submission:
a,b,c = raw_input().split()
a=int(a)
b=int(b)
c=int(c)
A = {a:1,b:1,c:1}

print len(A)
Buggy python submission (verdict: Runtime Error):
K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A


Fixed submission:
N,K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A

Buggy python submission (verdict: Runtime Error):

N,K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A


Fixed submission:
N,K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A

Buggy python submission (verdict: Runtime Error):

N,K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A


Fixed submission:
N,K = raw_input().split()
N=int(N)
K=int(K)
if N==1:
    print K
else:
    A = K*pow(K-1,N-1)
    print A
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
As = list(map(int, input().split()))

for i in range(K):
    table = [0 for _ in range(N*2)]
    # imos法 - メモ
    for j in range(N):
        ai = As[j]
        # 電球が照らす左端をメモ
        table[max((j-ai)*2-1, 0)] += 1
        # 電球が照らす右端をメモ
        table[min((j+ai)*2+1, N*2-1)] -= 1
    
    # imos法 - シミュレート
    for j in range(N*2):
        if j > 0:
            table[j] += table[j-1]
    
    # 答えになおす
    for j in range(N):
        As[j] = table[j*2]
    
    exit_condition = True
    for j in range(N):
        if As[j] != N:
            exit_condition = False
            break
    
    if exit_condition:
        print(*As)
        exit(0)
            

print(*As)

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

for i in range(K):
    table = [0 for _ in range(N*2)]
    # imos法 - メモ
    for j in range(N):
        ai = As[j]
        # 電球が照らす左端をメモ
        table[max((j-ai)*2-1, 0)] += 1
        # 電球が照らす右端をメモ
        table[min((j+ai)*2+1, N*2-1)] -= 1
    
    # imos法 - シミュレート
    for j in range(N*2):
        if j > 0:
            table[j] += table[j-1]
    
    # 答えになおす
    for j in range(N):
        As[j] = table[j*2]
    
    exit_condition = True
    for j in range(N):
        if As[j] != N:
            exit_condition = False
            break
    
    if exit_condition:
        print(*As)
        exit(0)
            

print(*As)
Buggy python submission (verdict: Runtime Error):
import sys
from copy import deepcopy
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def cal(a,b,k):
    return min(abs(a-b), k-abs(a-b))

def cal2(l):
    n = len(l)
    ans = 0
    for i in range(n-1):
        ans += l[i+1] - l[i]
    return ans
def main():
    k,n = map(int, input().split())
    As = list(map(int, input().split()))
    le = list()
    for i in range(n):
        if i == n-1:
            le.append(cal(As[i], As[0],k))
        else:
            le.append(As[i], As[i+1])
    print(k-max(le))
if __name__ == '__main__':
    main()

Fixed submission:
import sys
from copy import deepcopy
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def cal(a,b,k):
    return min(abs(a-b), k-abs(a-b))

def cal2(l):
    n = len(l)
    ans = 0
    for i in range(n-1):
        ans += l[i+1] - l[i]
    return ans
def main():
    k,n = map(int, input().split())
    As = list(map(int, input().split()))
    le = list()
    for i in range(n):
        if i == n-1:
            le.append(cal(As[i], As[0] , k) )
        else:
            le.append(As[i+1]- As[i])
    print(k-max(le))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
from copy import deepcopy
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def cal(a,b):
    return min(abs(a-b), k-abs(a-b))

def cal2(l):
    n = len(l)
    ans = 0
    for i in range(n-1):
        ans += l[i+1] - l[i]
    return ans
def main():
    k,n = map(int, input().split())
    As = list(map(int, input().split()))
    le = list()
    for i in range(n):
        if i == n-1:
            le.append(cal(As[i], As[0]))
        else:
            le.append(As[i], As[i+1])
    print(k-max(le))
if __name__ == '__main__':
    main()

Fixed submission:
import sys
from copy import deepcopy
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def cal(a,b,k):
    return min(abs(a-b), k-abs(a-b))

def cal2(l):
    n = len(l)
    ans = 0
    for i in range(n-1):
        ans += l[i+1] - l[i]
    return ans
def main():
    k,n = map(int, input().split())
    As = list(map(int, input().split()))
    le = list()
    for i in range(n):
        if i == n-1:
            le.append(cal(As[i], As[0] , k) )
        else:
            le.append(As[i+1]- As[i])
    print(k-max(le))
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
from math import ceil, floor, comb
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    n,m = map(int, input().split())
    print((comb(n,2)) + (comb(m,2)))
    return

if __name__ == '__main__':
    main()

Fixed submission:
import sys
from math import ceil, floor, factorial
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def comb(n, r):
    if n-r < 0:
        return 0
    return factorial(n) // (factorial(n - r) * factorial(r))


def main():
    n,m = map(int, input().split())
    print((comb(n,2)) + (comb(m,2)))
    return

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    n,a,b = map(int, input().split())
    q = deque()

    while len(q) < n:
        for i in range(a):
            q.append('Blue')
        for i in range(b):
            q.append('Red')
    
    blue = 0
    for i in range(n):
        if q[i] == 'Blue':
            blue += 1
    print(blue)
    return

if __name__ == '__main__':
    main()

Fixed submission:
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    n,a,b = map(int, input().split())

    # k = n // (a+b): 完璧にループがおわったぶん
    # ここにあるBlueはa*k
    # n -( k*(a+b)) : 端数
    # ここにあるBlueはmin(n-(k*(a+b)), a)
    k = n // (a+b)
    eprint(k)
    eprint(min(n-(k*(a+b)), a))
    print(a*k + min(n-(k*(a+b)), a))
    return 

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
22 3051

Fixed submission:
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    n, r = map(int, input().split())
    if n>= 10:
        print(r)
    else:
        # r = 100 * (10-n)
        print(r+ 100*(10-n))
    return

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

def main():
    s,t = input().split()
    a,b  = map(int, input().split())
    u = int(input())
    
    if u == s:
        print(a-1)
    else:
        print(b-1)
    return

if __name__ == '__main__':
    main()

Fixed submission:
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

def main():
    s,t = input().split()
    a,b  = map(int, input().split())
    u = input().split('\n')[0]
    
    if s==u:
        print(a-1,b)
    else:
        print(a, b-1)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from operator import itemgetter

h, n = map(int, input().split())
ABs = [list(map(int, input().split())) for i  in range(n)] 

#  dp[i][h] 最初の i 種類の魔法でモンスターに h のダメージを与える場合の、消費魔力の最小値
dp = [[10**9]*(h+1)]*(n+1)
dp[0][0] = 0

for i in range(n):
    for j in range(h):
        a = ABs[i][0]
        b = ABs[i][1]
        # i種類目の魔法を使わない場合
        dp[i+1][j] = min(dp[i][j], dp[i+1][j])

        # i種類目の魔法を使う場合
        #min(j+A[i], H) -> hより大きいダメージを与える場合は、与えるダメージをhとして計算する。
        # dp[i+1][j] + b -> i+1種類目の魔法を使った場合の消費魔力
        dp[i+1][min([j+a,h])] = min([ dp[i+1][j] + b, dp[i+1][min([j+a,h])] ])

print(min([row[j+1] for row in dp]))

Fixed submission:
from operator import itemgetter

h, n = map(int, input().split())
ABs = [list(map(int, input().split())) for i  in range(n)] 

#  dp[i][h] 最初の i 種類の魔法でモンスターに h のダメージを与える場合の、消費魔力の最小値
dp = [[10**9]*(h+1)]*(n+1)
dp[0][0] = 0

for i in range(n):
    for j in range(h):
        a = ABs[i][0]
        b = ABs[i][1]
        # i種類目の魔法を使わない場合
        dp[i+1][j] = min(dp[i][j], dp[i+1][j])

        # i種類目の魔法を使う場合
        #min(j+A[i], H) -> hより大きいダメージを与える場合は、与えるダメージをhとして計算する。
        # dp[i+1][j] + b -> i+1種類目の魔法を使った場合の消費魔力
        dp[i+1][min([j+a,h])] = min([ dp[i+1][j] + b, dp[i+1][min([j+a,h])] ])

print(min([row[j+1] for row in dp]))
Buggy python submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd

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

def lcm_list(l):
    lcm = l[0]
    for i in range(len(l)):
        lcm = lcm*l[i] // gcd(lcm, l[i])
    return lcm

mod = 10**9 + 7
n = int(input())
As = list(map(int, input().split()))

lcm = lcm_list(As)
b = [lcm//As[i] for i in range(n)]

print(sum(b) % mod)


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

if n == m:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n, k, s = map(int, input().split())

for i in range(1, n+1):
    if i <= k:
        print(s)
    else:
        if s == 10**9:
            print(1)
        else:
            print(10**9)


Fixed submission:
from operator import itemgetter

n = int(input())
XLs = [list(map(int, input().split())) for i in range(n)]

for i in range(n):
    x = XLs[i][0]
    l = XLs[i][1]
    XLs[i].append(x+l)

#右手の端の位置でソート

XLs.sort(key=itemgetter(2))

choice = -10**10
cnt = 0
for i in range(n):
    x = XLs[i][0]
    l = XLs[i][1]

    if choice <= x-l:
        choice = x+l
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
from collections import deque
import numpy as np
import math

h, w = list(map(int, input().split()))
SHWs = [input() for i in range(h)]

def bfs(sy, sx):
    visited = [[-1]*w for i in range(h)]
    visited[sy][sx] = 0
    que = deque([[sy, sx]])
    while que:
        
        y,x = que.popleft()
        for i, j in [(1,0),(0,1),(-1,0),(0,-1)]:
            next_y, next_x = y+i, x+j
            # print(visited)
            if next_y < 0 or next_x < 0 or next_y > h-1 or next_x > w-1:
                continue
            if SHWs[next_y][next_x] == '.' and (visited[next_y][next_x] == -1 or visited[next_y][next_x] > visited[y][x]+1):
                visited[next_y][next_x] = visited[y][x] + 1
                que.append([next_y, next_x])
    
    return np.amax(np.array(visited))

            
ans = 0
for sy in range(h):
    for sx in range(w):
        if SHWs[sy][sx] == '#':
            continue
        count = bfs(sy=sy, sx=sx)

        if count > ans:
            ans = count


print(ans)



Fixed submission:
c = input()
ordc = ord(c)

if ordc != 122:
    print(chr(int(ordc)+1))
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
import math
x = int(input())
c = math.floor(x / 105)
if 100*c <= x 105*c:
    print(1)
else:
    print(0)



Fixed submission:
import math
x = int(input())
c = math.floor(x / 100)
if 100*c <= x <= 105*c:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
As = list(map(int, input().split()))


def key_search(dicti, item):
    for k, v in dicti.items():
        if v == item:
            return k


popu = {str(i): As[i] for i in range(n)}
jb = {str(i+1): int(key_search(popu, i+1)) + 1 for i in range(n)}

# print(popu)
# print(jb)

Ans = [jb[str(i+1)] for i in range(n)]
print(*Ans)








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


def key_search(dicti, item):
    for k, v in dicti.items():
        if v == item:
            return k


# print(As)
sb = {str(i): As[i-1] for i in range(1, n+1)}
jb = {}
for i in range(1, n+1):
    # print(sb[str(i)])
    jb[sb[str(i)]] = i
srted = sorted(jb.items())

ans = [srted[i][1] for i in range(n)]
print(*ans)