/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 400 点
問題文
英大文字からなる文字列 S に対し、以下の操作を 0 回以上繰り返すとき行うことのできる操作回数の最大値を f(S) とします。
- 連続する 3 文字が
ARCである箇所を 1 つ選び、CRAに置き換える。
例えば S= ARARC に対し f(S)=2 です(ARARC \to ARCRA \to CRARA と操作が出来て、これが最大である)。
0 以上 600 以下の整数 X が与えられます。
f(S)=X を満たす長さ 1 以上 100 以下の英大文字からなる文字列 S を 1 つ求めてください。
ただし、制約下でそのような文字列が必ず存在することが証明できます。
制約
- 0\le X\le 600
- 入力される値は整数
入力
入力は以下の形式で標準入力から与えられる。
X
出力
f(S)=X を満たす長さ 1 以上 100 以下の英大文字からなる文字列 S を 1 つ出力せよ。
そのような文字列 S が複数存在する場合、どれを出力しても正答となる。
入力例 1
2
出力例 1
ARARC
S= ARARC は英大文字からなる長さ 5 の文字列で、f(S)=2 を満たします。したがって、ARARC を出力すると正答となります。
この他にも、ARCXXXARC などを出力しても正答となります。
入力例 2
0
出力例 2
ATCODER
入力例 3
3
出力例 3
ARARCDARC
Score : 400 points
Problem Statement
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 \to ARCRA \to 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.
Constraints
- 0\le X\le 600
- The input value is an integer.
Input
The input is given from Standard Input in the following format:
X
Output
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.
Sample Input 1
2
Sample 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.
Sample Input 2
0
Sample Output 2
ATCODER
Sample Input 3
3
Sample Output 3
ARARCDARC