Finding CB NUmbers


Testcase 3 is not passing

Hello @Bhavya_Goel could you please explain your approach till then?

@Bhavya_Goel for test cases like these.
8
86922395
your code is giving ouput 5 but the answer should be 2.

@Bhavya_Goel check this i have corrected your code:

Im glad that you have corrected the code…

but could you tell me where was I getting it wrong?!?!

@Bhavya_Goel for the test case i have given above your code was printing the answer 5 so that means that you must be considering any numbers for more than once because the output should be 2 for it.

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.