No.3264 Iwai Number
タグ : / 解いたユーザー数 146
作問者 :
Andrew8128
/ テスター :
ゆにたりー卿
DeltaStruct
kazuppa
👑
bolero
のらら
Rice_tawara459
よには
yimiya(いみや)
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もしくは右上の雲マークをクリックしてアカウントを作成してください。