問題一覧 > 通常問題

No.3264 Iwai Number

レベル : / AI推定難易度 : 800 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 146
作問者 : Andrew8128 / テスター : ゆにたりー卿 DeltaStruct kazuppa 👑 loop0919 bolero elphe のらら Rice_tawara459 よには yimiya(いみや)
お気に入りにしたユーザー ProblemId : 12498 / 自分の提出
問題文最終更新日: 2025-09-06 11:58:18
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
第2回 岩井星人アンソロジープログラミングコンテスト Div.2 (順位表) の他の問題:

Problem Statement

The user ID of Iwai Seijin on competitive programming sites is yiwiy9.

Here, we call an integer obtained by appending $9$ to the end of a palindromic number greater than or equal to $1$ an Iwai number. For example, $381839$, $19$, and $999$ are Iwai numbers, but $9119$, $709$, and $9$ are not.

You are given an Iwai number $N$. Output $1$ integer that satisfies all of the following conditions.

  • It is an Iwai number
  • It is a multiple of $N$
  • It is at least $10^9$ and at most $10^{2000}$

It can be proved that a number satisfying the conditions always exists under the constraints of this problem.

What is a palindromic number? A non-negative integer $X$ is called a palindromic number if the string representing $X$ in base $10$ notation (without leading zeros) is a palindrome. For example, $38183$, $1$, and $99$ are palindromic numbers.

Constraints

  • $N \leq 10^9$
  • $\textcolor{red}{\it{N}}$ is an Iwai number

Input

The input is given from standard input in the following format.

$N$

Output

Output $1$ number that satisfies the conditions. If there are multiple numbers that satisfy the conditions, any of them will be accepted.

Sample

Sample 1
Input
19
Output
1001110019

$1001110019$ is an Iwai number. Also, $1001110019$ is a multiple of $19$. Furthermore, it satisfies $10^9$ $\leq$ $1001110019$ $\leq$ $10^{2000}$.

Other numbers, such as $123456789012332109876543219$, also satisfy the conditions, and outputting them will also be accepted.

Sample 2
Input
381839
Output
1000800019

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