from collections import deque
n,m=input().split()
seq=deque(input().split())
seq.rotate(int(m))
Res=list(seq)
for i in range(len(Res)):
if i==len(Res)-1:
print(Res[i],end='')
else:
print(Res[i],end=' ')
PAT 1008 数组元素循环右移问题
最新推荐文章于 2022-12-11 16:45:00 发布