Chewbacca and Number


2 test cases are right 3 are wrong

Hi @Learning_bunny
First of all it is given in the question that n<10^18 so you should take n as long int and the case when a number starts from 9 then you are making it to start from 0. And it is given in the question that number should not contain any leading 0.

Here is the corrected code :

bhaiya 3rd test case is still wrong

The code that i have shared with you is correct and will be passing all the test cases. Kindly refresh you page and try to submit it once again.