https://ide.codingblocks.com/s/241109
What is wrong with the logic ?
Only 2 tc are passing
you are not dealing with zeroes correctly, for example in case of 1020 answer should be 1, but your answer is 4. Please try to debug with this sample case.
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.