Didn't get it completely

there is an example of cb number till 29. so question is this that does it stop there or complete whole prime number?
And plz explain the example of 4991

@ELX-OL0014 bro read carefully, it says one of the conditions for cb numbers is num should be divisible by primes form 2 to 29.
Now for 4991, here 499 and 991 are cb but you can choose 1 , see that 99 part in it.

Close the doubt by marking it resolved bro, if you have any other query feel free to ask!

if they are cb so why should we select 1 only why not both
and one more thing in the sample output there is 2, in explanation it is said that 61 and 5 are the two. But here I saw some previous query there were reply with an example of 8161 and 5

@ELX-OL0014 Have you read that superstring and substring line? that is the answer for your why not both query and also its mentioned that there can be multiple solutions but you have to tell the maximum count. Read the question carefully and completely!

bro I read it, I didn;t get those words that;s why I;m asking here to elaborate this question in a complete way not the part by part plz

@ELX-OL0014 In 4991, both 499 and 991 are CB numbers but 99 is common substring so you can count only 1 (499 or 991) as a CB number. This is the reason here bro and ya there can be multiple answers as you pointed out for 81615.
1st answer :- 8161 and 5
2nd answer :- 61 and 5 so see if you consider 8161 then you cant consider 61 as it is substring of 8161 now if you consider 61 then you cant take 8161 because it superstring for 61. So thats why they are asking for max count in both the cases max possible cb numbers are 2 only.

I think I had elaborated your query now, if its clear mark it resolved bro else feel free to ask!

1 Like