#abc247c. C - 1 2 1 3 1 2 1
C - 1 2 1 3 1 2 1
Score : points
问题描述
我们按以下方式定义序列 。
- 是一个长度为 的序列,仅包含一个数字 。
- 当 (一个大于等于 的整数)时, 是通过按照顺序连接 、 和 获得的序列。
例如,以下是 和 的定义:
- 是按照 、 和 的顺序拼接而成,因此它是 。
- 是按照 、 和 的顺序拼接而成,因此它是 。
给定 ,请打印整个序列 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
We define sequences as follows.
- is a sequence of length containing a single .
- ( is an integer greater than or equal to ) is a sequence obtained by concatenating , , in this order.
For example, and is defined as follows.
- is a concatenation of , , and , in this order, so it is .
- is a concatenation of , , and , in this order, so it is .
Given , print the entire sequence .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print , with spaces in between.
Sample Input 1
2
Sample Output 1
1 2 1
As described in the Problem Statement, is .
Sample Input 2
1
Sample Output 2
1
Sample Input 3
4
Sample Output 3
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1
- is a concatenation of , , and , in this order.
update @ 2024/3/10 10:35:36