No.2614 Delete ABC
問題文最終更新日: 2024-01-22 23:21:01
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 416
(順位表)
の他の問題:
Problem Statement
For an integer $N$ greater than or equal to $2$, find one string $S$ of length $3N$ that satisfies all of the following conditions.
- Each character of $S$ is one of
A,B, andC. - $S$ cannot be turned into the empty string just by repeating the operation of deleting a substring
ABCfrom $S$. - $S$ can be turned into the empty string just by repeating the operation of deleting a not necessarily contiguous subsequence
ABCfrom $S$. - $S$ contains none of the substrings
AA,BB, andCC.
Input
Line $1$ contains an integer $T$. Then, $T$ test cases follow.Line $i + 1$ ($1 \le i \le T$) contains the $i$-th test case in the following format.
$N$The input satisfies the following constraints.
- All input values are integers
- $1 \le T \le 100$
- $2 \le N \le 100$
Output
For each test case, print the answer string on $1$ line.
If there are multiple answers, any of them will be accepted.
Print a newline after each test case.
Sample
Sample 1
Input
2 2 3
Output
ABACBC ABACABCBC
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
startcpp