CB Numbers Strings Question

I am not able to pass all the testcases can you let me know where I am going wrong?