Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131491 王亦鸣 数组中元素交换 Python3 Accepted 64 MS 3768 KB 147 2025-09-27 13:16:19

Tests(10/10):


Code:

n = int(input()) a = input().split() n = n//2 t =1 i = 0 while t<=n: a[i],a[i+1] = a[i+1],a[i] i+=2 t +=1 print(" ".join(a))