Two test cases not passing


and

i the code that i have written please help it is not passing the 2 test cases

Hi @Siddharth6780
u havent taken into consideration the corner cases,

The decimal representation of the final number shouldn't start with a zero.

if the 1st digit is 9 u do not have to convert it let it remain 9

also if the number is -ve u need to display the o/p to be a -ve no
i have updated the code, have a look

can the number be negative because in constrains it is given that x (1 ≤ x ≤ 10^18)

x <= 100000000000000000
i dont see a left bound in the question constraint , so the input accepts -ve values as well

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.