1044: 使前面各数顺序向后移m个位置

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

有n个整数,使前面各数顺序向后移m个位置,最后m个数变成前面m个数。写一函数move:实现以上功能,在主函数中输入n个数和输出调整后的n个数。

Input

输入数据的个数n n个整数移动的位置m

Output

移动后的n个数

Sample Input Copy

10
1 2 3 4 5 6 7 8 9 10
2

Sample Output Copy

9 10 1 2 3 4 5 6 7 8

Source/Category