Problem1046--数字的移动

1046: 数字的移动

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 59  Solved: 27
[Submit] [Status] [Web Board] [Creator:]

Description

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

Input

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

Output

移动后的n个数

Sample Input

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

Sample Output

9 10 1 2 3 4 5 6 7 8