Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134990 胡海峰老师 22数列变换III Python3 Accepted 52 MS 3772 KB 240 2025-11-01 21:57:02

Tests(2/2):


Code:

n = int(input()) arr = list(map(int, input().split())) k = int(input()) for _ in range(k): x = int(input()) # 第 x 个元素在索引 x-1 处 elem = arr.pop(x - 1) arr.append(elem) print(' '.join(map(str, arr)))