#K71217. Delete One Digit to Maximize Number

    ID: 33483 Type: Default 1000ms 256MiB

Delete One Digit to Maximize Number

Delete One Digit to Maximize Number

Problem Statement:

Given an integer n, delete exactly one digit from its decimal representation such that the remaining number is as large as possible. In other words, remove the i-th digit from n and let m be the resulting number. Your task is to choose the digit to remove in order to maximize m.

This can be formalized as follows:

Given an integer \( n \) with decimal representation \( d_1d_2\dots d_k \), compute \[ m = \max_{1 \le i \le k} \{ \text{int}(d_1 \dots d_{i-1} d_{i+1} \dots d_k) \} \] where \( \text{int}(\cdot) \) converts the remaining string of digits to an integer.

Note: The input will be provided via standard input and the output should be printed to standard output.

inputFormat

The input consists of a single integer n provided via standard input.

outputFormat

Print the maximum number obtainable by deleting exactly one digit from n on a single line to standard output.## sample

152
52

</p>