Related to explanation

how is 499 substring or superstring of 991 or vice-versa?
Shouldn’t they both be considered?

Hi @pradhumangupta99

As the number is 4991, then 99 can be either taken with 4 making it 499 or 99 can be taken with 1 , making it 991. But it can’t be taken with both. Hence the answer 1.

Hope it Helps.

but 99 is not a cb number?
and in the problem it is mentioned that a cb number should not be a part of another cb number as a substring or superstring.

That’s what i am saying, from 4991 two cb numbers are possible - 499,991 but both use the common digits 99.Hence only one of the following numbers can be counted either 499 or 991.