Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
85615 丁俊杰 序列变换II Python3 Accepted 36 MS 3760 KB 278 2024-07-19 00:51:12

Tests(10/10):


Code:

n=int(input()) a=list(map(int,input().split())) results=[] for i in range(n): index1=a[i]-1 #第一次将数字转化成索引 index2=a[index1]-1 #第二次将数字转化成索引 results.append(a[index2]) for result in results: print(result,end=" ")