not getting output
Cb number probllem
@guptashubham210a since size of string is 17 use long long because int will overflow, also check for each substring by dividing with all numbers present in set
why int wiill overflow?
size is less than 10^8 na
its giving index out of bound pls correct me
@guptashubham210a you are finding ans by using formula
Ans=Ans+ p*b[I]
But b[I] is a character change it into number by
Doing this b[I]-‘0’, also checking prime complexity is sqrt of n which will give tle
ohh got it ,so pls tell me some other approach if mine is not correct?
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.
Shubham, I have edited your code… Try to submit now…