Kth root problem


this code doesnt pass any testcase.
Also kindly guide me with how to find the search space for this one.
Like the start and ending point should be from where to where?

Hello @mkidwai74 the range in this should be from 1 to n because if the x and n are same then the power will be 1.
and if x is 1 then then the power can go to equal to n.
so we will choose the range like this.
check this is the correct code:

you have raised the doubt again but i have given you the correct code.
you have to just output the “ans” at the last but you are printing mid. this is just the small mistake.

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.