sir i am not able to catch error in my code which is giving me TLE .
Question ->
Base numbers problem
can you explain your approach?
the formula you have used to find no of digits
is incorrect
int digits=floor(log(a)/log(b)+(mid*log(mid))/log(b))+1;
correct one
int digits=floor(log(a)/log(b)+ mid*(log(mid)/log(b))+1;
i am using this approach to find the number of digits from base 10 to any base , and then counting the values of x (mid) satisfying the formula of this approach till start>end . Approach -> https://www-geeksforgeeks-org.cdn.ampproject.org/v/s/www.geeksforgeeks.org/given-number-n-decimal-base-find-number-digits-base-base-b/amp/?amp_js_v=a6&_gsa=1&usqp=mq331AQKKAFQArABIIACAw%3D%3D#aoh=16300580588323&referrer=https%3A%2F%2Fwww.google.com&_tf=From%20%1%24s&share=https%3A%2F%2Fwww.geeksforgeeks.org%2Fgiven-number-n-decimal-base-find-number-digits-base-base-b%2F