Every test case is not passing

Hello @Avishek-Kumar-2445349249011561,

Your code is failing for the test cases like:
5
24192
Expected Output:
3
Your output:
2

Try to correct your code with the help of this example.

Let me know if you want some help in correcting it.
Hope, this would help.

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.