問題一覧 > 通常問題

No.1264 010

レベル : / AI推定難易度 : 850 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 334
作問者 : stoq / テスター : ekaraage
お気に入りにしたユーザー ProblemId : 4664 / 自分の提出
問題文最終更新日: 2020-10-22 00:02:09
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 271 (順位表) の他の問題:

Problem Statement

Consider the following operation on a string consisting only of 0 and 1 (a 01-string).

  • If the string contains $010$ as a contiguous substring, replace the leftmost occurrence with $101$.
    Repeat this until the string no longer contains $010$.
For example, applying the operation to $010010$ gives $010010 \rightarrow 101010 \rightarrow 110110$, so 2 replacements are performed.

Find one 01-string $s$ of length at least $1$ and at most $1010$ for which the number of replacements until the operation stops is exactly $N$. (It can be proved that a solution always exists under this constraint.)

Input

$N$

  • $N$ is an integer
  • $0 \leq N \leq 1000$

Output

Output a 01-string of length at least $1$ and at most $1010$ that satisfies the condition.

Sample

Sample 1
Input
2
Output
010010

This is the example from the problem statement. If multiple solutions exist, you may output any of them.

Sample 2
Input
0
Output
1

Sample 3
Input
4
Output
00100100

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。