#abc278a. A - Shift
A - Shift
Score : points
问题描述
给定一个长度为 的序列 。
你需要执行以下操作恰好 次:
- 删除 的首元素,并在 的尾部添加一个 。
请输出经过这些操作后, 中的所有元素。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a sequence of length .
You perform the following operation exactly times:
- remove the initial element of and append a to the tail of .
Print all the elements of after the operations.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the elements of after the operations in one line, separated by spaces.
Sample Input 1
3 2
2 7 8
Sample Output 1
8 0 0
Before the operations, .
After performing the operation once, .
After performing the operation twice, .
Thus, is the answer.
Sample Input 2
3 4
9 9 9
Sample Output 2
0 0 0
Sample Input 3
9 5
1 2 3 4 5 6 7 8 9
Sample Output 3
6 7 8 9 0 0 0 0 0
update @ 2024/3/10 11:41:20