C语言10.17

Time Limit: 1000ms
Memory Limit: 32768KB
64-bit integer IO format: %lld      Java class name: Main

Description

输入n个整数,使前面的n-m个数顺序向后移动m个位置,最后的m个数变成最前面的m个数。通过函数实现以上的功能。

Input

第一行包含两个用空格隔开的整数n和m,保证n>m且n不超过50。第二行包含n个用空格隔开的整数。

Output

输出进行题目描述操作之后的n个整数,每个整数之后输出一个空格。
请注意行尾输出换行。

Sample Input

6 2
1 2 3 4 5 6

Sample Output

5 6 1 2 3 4 

Author

Admin
Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .