第 229 场 AtCoder Regular Contest
A
AtCoder 反转竞赛
AtCoder Reverse Contest
AtCoder
⌀ 1034
原题
←B →

AtCoder 反转竞赛AI (CI翻译)

Problem Statement

题目描述

AI (CI翻译)

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.

对于一个由大写英文字母组成的字符串 $S$,令 $f(S)$ 表示重复执行以下操作零次或多次时,最多可以执行的操作次数。AI (CI翻译)

  • Choose one occurrence of the substring ARC and replace it with CRA.
  • 选择一个子串 ARC 的出现位置,并将其替换为 CRA。
AI (CI翻译)

For example, for $S=$ ARARC, $f(S)=2$ (the operations ARARC $\to$ ARCRA $\to$ CRARA can be performed, and this is the maximum).

例如,对于 $S=$ ARARC,$f(S)=2$(可以依次执行 ARARC $ o$ ARCRA $ o$ CRARA,且这是最多的操作次数)。AI (CI翻译)

You are given an integer $X$ between $0$ and $600$ (inclusive).

给定一个 $0$ 到 $600$(含)之间的整数 $X$。AI (CI翻译)

Find one string $S$ consisting of uppercase English letters, of length between $1$ and $100$ (inclusive), satisfying $f(S)=X$.

请找出一个由大写英文字母组成的字符串 $S$,其长度在 $1$ 到 $100$(含)之间,且满足 $f(S)=X$。AI (CI翻译)

It can be proved that such a string always exists under the constraints.

可以证明,在给定约束下,这样的字符串总是存在。AI (CI翻译)

Constraints

约束条件

AI (CI翻译)
  • $0\le X\le 600$
  • The input value is an integer.
  • $0\le X\le 600$
  • 输入值为整数。
AI (CI翻译)

Input

输入格式

AI (CI翻译)

The input is given from Standard Input in the following format:

输入从标准输入按以下格式给出:AI (CI翻译)

X

X
AI (CI翻译)

Output

输出格式

AI (CI翻译)

Output one string $S$ consisting of uppercase English letters, of length between $1$ and $100$ (inclusive), satisfying $f(S)=X$.

输出一个由大写英文字母组成的字符串 $S$,其长度在 $1$ 到 $100$(含)之间,且满足 $f(S)=X$。AI (CI翻译)

If there are multiple such strings $S$, any of them will be accepted.

如果有多个满足条件的字符串 $S$,输出其中任意一个即可。AI (CI翻译)

样例

Input #1
2
Output #1
ARARC
$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.
Input #2
0
Output #2
ATCODER
Input #3
3
Output #3
ARARCDARC
题目信息
题号
arc229_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。