Test case failing for two outputs

Please tell me where I am wrong

hi @Riya-Verma-1207263756078812, output for 900 is giving zero 0 it should not happen as the question says The decimal representation of the final number shouldn’t start with a zero.

then what would be the condition if rem is 0 or 9

hi @Riya-Verma-1207263756078812,
see it shoud not start with 0 so if at first position 9 is there dont change
so for 900 ans is 900 only
for 999 ans is 900 because you convert rest last 2 9 to 0 except first 1

Now it’s passing for 900… just one testcase is failing

@Riya-Verma-1207263756078812, check 999 ans is 900

How to do that… can you please tell me in code.

check here ive commented https://ide.codingblocks.com/s/660879
@Riya-Verma-1207263756078812

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.