when matched with input and output of testcases getting correct. PLZ HELP
Don't understand why getting WA
Consider a test case:
999000
Expected O/p:
900000
Your O/p:
0
for input- 999000 output should be 9000 instead of 900000, becoz we have to output min number
Check for case
999888
Output should be:
900111
I think output should be 111, not 900111
also why test case 2 is failing, input is -332711047202, I am getting correct output as mentioned
The number shouldn’t contain leading zeroes. So you cannot invert the leading digits to 0.
So the first 9 cannot be converted to 0.After that all 9s can be converted to 0.
Yes for 332711047202 your code is giving correct output. Try to correct for the case i mentioned above and then check.