C语言程序设计教程(第三版)课后习题10.4

Time Limit
1s
Memory Limit
131072KB
Judge Program
Standard
Ratio(Solve/Submit)
51.61%(659/1277)
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 

Submit