Help in *REVERSE MAXIMIZATION*

My code is passing all test cases except the last one. Please provide me a test case for which it fails.

https://www.codechef.com/viewsolution/24388554

try 1069999 as input

1 Like

10009999

your answer gives 10008999

1 Like

Yeah any number with 1 + zeroes + some number + 9s gives wrong answer I think.

1 Like

Got it !! Thanks a lot !!!