Please tell me why testcase 3 is wrong. Remaining testcases passed.
Testcase 3 is wrong
hey @ankush.bhardwaj0, logic is not correct in your question as you should check first digit also, if it is 9 than you should not subtract it from nine.
I suggest you to go through this video once. Prateek sir explained it very well
I watched the video. It’s just a different approach. In my case also when the digit is 9 , i dont do anything to it. All testcases i can think of has given me correct solution. Please tell me a testcase which fails my code.
hey @ankush.bhardwaj0, your code is giving answer for this input
input
99999
correct output
90000
your output
99999
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.