PAT 乙级 1008

用python超级快诶

n,m=map(int,input().split())
l=input().split()
m%=n
l=l[-m:]+l[:-m]
print(" ".join(l))

你可能感兴趣的:(pat考试,算法,python)