AT_arc229_a.AtCoder Reverse Contest
普及+/提高
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
For a string S consisting of uppercase English letters, let f(S) be the maximum number of times the following operation can be performed when it is repeated zero or more times.
- Choose one occurrence of the substring
ARCand replace it withCRA.
For example, for S= ARARC, f(S)=2 (the operations ARARC → ARCRA → CRARA can be performed, and this is the maximum).
You are given an integer X between 0 and 600 (inclusive).
Find one string S consisting of uppercase English letters, of length between 1 and 100 (inclusive), satisfying f(S)=X.
It can be proved that such a string always exists under the constraints.
对于一个仅由大写英文字母组成的字符串 S,定义 f(S) 为以下操作最多可执行的次数(允许执行零次或多次):
- 选择子串
ARC的一次出现,并将其替换为CRA。
例如,当 $S = $ ARARC 时,f(S)=2(可执行操作 ARARC → ARCRA → CRARA,且这是最大可能次数)。
给定一个介于 0 和 600(含端点)之间的整数 X。
请找出一个仅由大写英文字母组成的字符串 S,其长度在 1 到 100(含端点)之间,且满足 f(S)=X。
在本题约束下,可以证明这样的字符串一定存在。
输入格式
The input is given from Standard Input in the following format:
X
输入从标准输入中按以下格式给出:
X
输出格式
Output one string S consisting of uppercase English letters, of length between 1 and 100 (inclusive), satisfying f(S)=X.
If there are multiple such strings S, any of them will be accepted.
输出一个仅由大写英文字母组成的字符串 S,其长度在 1 到 100(含)之间,且满足 f(S)=X。
若存在多个满足条件的字符串 S,输出其中任意一个即可。
输入输出样例
输入#1
2
输出#1
ARARC
输入#2
0
输出#2
ATCODER
输入#3
3
输出#3
ARARCDARC
说明/提示
Sample 1 Explanation:
S= ARARC is a string of length 5 consisting of uppercase English letters, satisfying f(S)=2. Thus, outputting ARARC will be accepted.
Besides this, ARCXXXARC, for example, will also be accepted.
Constraints
- 0≤X≤600
- The input value is an integer.
样例 1 解释:
S= ARARC 是一个长度为 5 的、仅由大写英文字母组成的字符串,满足 f(S)=2。因此,输出 ARARC 是可接受的。
此外,例如 ARCXXXARC 也是可接受的。
约束条件
- 0≤X≤600
- 输入值为整数。
输入解题思路,AI测评打分。不知道怎么写?