Exchange of digits
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
What is the largest number you can get by swapping two digits in a given integer N?
Input
An integer N, with an absolute value not exceeding 10^15
.
Output
The largest possible number after performing the swap.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 7%