No.2198 Concon Substrings (COuNt-CONstruct Version)
タグ : / 解いたユーザー数 65
作問者 : 👑
Problem Statement
Output one string $S$ of lowercase English letters, with length between $1$ and $60000$, inclusive, that satisfies the following condition.
- The number of (not necessarily contiguous) subsequences of $S$ that are equal to
conis exactly $M$.
Two subsequences of $S$ are distinguished if the positions they are taken from differ. It can also be shown that a string $S$ satisfying the condition exists under the constraints of this problem.
Constraints
- $M$ is an integer.
- $0 \leq M \leq 10^{12}$
Input
The input is given from standard input in the following format.
$M$
Output
Output a string of lowercase English letters, with length between $1$ and $60000$, inclusive, that satisfies the condition. If there are multiple such strings, any of them will be accepted.
Sample
Sample 1
Input
4
Output
concon
For $S=$ concon, the subsequences equal to con are the following, $4$ in total.
conformed by the $1, 2, 3$-th characters of $S$.conformed by the $1, 2, 6$-th characters of $S$.conformed by the $1, 5, 6$-th characters of $S$.conformed by the $4, 5, 6$-th characters of $S$.
Therefore, this $S$ satisfies the condition.
Sample 2
Input
1
Output
con
con itself contains exactly one con as a subsequence.
Sample 3
Input
0
Output
kudamakitsukasa
Sample 4
Input
56
Output
conconconconconcon
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。