| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 57 | 38 | 32 | 64.000% |
You are given an integer greater than or equal to $2$. When this number is decomposed into the sum of two positive integers, a new integer number can be formed as the concatenation of the decimal representations of the two integers. Find the maximum possible number formed in this way.
For example, $102$ can be decomposed and concatenated as follows.
$ \begin{array}{l l l} 1 + 101 &\rightarrow& 1101 \\ 2 + 100 &\rightarrow& 2100 \\ 3 + 99 &\rightarrow& 399 \\ 4 + 98 &\rightarrow& 498 \\ & \vdots & \\ 101 + 1 &\rightarrow& 1011 \end{array} $
Among them, $92 + 10 \rightarrow 9210$ is the largest.
The input consists of a single test case in a single line. The line contains an integer between $2$ and $10^{17}$, inclusive, which is the integer to be decomposed and concatenated.
Output the maximum possible number in a line.
8
71
2025
10251000
102
9210
99999999999999999
8999999999999999910000000000000000