470. Maximize Your Score
0
Easy
Given a string number representing your score in a test and a character digit, find the maximum possible score after removing exactly one occurrence of the digit. The resulting score should be in decimal form. The test cases are designed such that the digit occurs at least once in the number.
Input Format
The first line contains a string number.
The second line contains a character digit.
The second line contains a character digit.
Output Format
A string representing the maximum score.
Example
Input
14323938
3
Output
1432938
Constraints
1 <= N <= 10000
'1' <= digit <= '9'
Digit occurs at least once in the number
'1' <= digit <= '9'
Digit occurs at least once in the number
Loading...
View Submissions
Console