logo AlgoBeat OnlineJudge
登录 注册

#214781. [ICPC 2025 Yokohama R] Decompose and Concatenate

内存限制:2048 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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.

Among them, is the largest.

输入格式

The input consists of a single test case in a single line. The line contains an integer between and , inclusive, which is the integer to be decomposed and concatenated.

输出格式

Output the maximum possible number in a line.

样例

样例输入 1

8

样例输出 1

71

样例输入 2

2025

样例输出 2

10251000

样例输入 3

102

样例输出 3

9210

样例输入 4

99999999999999999 

样例输出 4

8999999999999999910000000000000000