#K94917. Largest Number Formation by Removing One Digit
Largest Number Formation by Removing One Digit
Largest Number Formation by Removing One Digit
Given a non-empty string (S) consisting solely of digits (0-9), your task is to remove exactly one digit from (S) such that the resulting number, when interpreted as a decimal number, is as large as possible. In other words, if (S) has length (n), remove one character to form a string of length (n-1) which represents the maximum number among all possibilities.
For example, for (S = 12345), removing the first digit leads to (2345), which is the largest possible result.
inputFormat
Input is provided via standard input (stdin) as a single line that contains the string (S).
outputFormat
Output the largest possible number (as a string) that can be obtained by removing exactly one digit from (S). The result should be printed to standard output (stdout).## sample
12345
2345