For kth root problem please tell my mistake

https://ide.codingblocks.com/s/68067
here is link to my code

Dhruv i have marked ur mistakes and suggest changes
check this https://ide.codingblocks.com/s/68073

sir can you please provide me the code for this;

@Dhruv-Miglani-2090236747707980 yes we can but try to work on it. you can do it with a suggestion if you aren’t able to do after some time tell us we will again help you.

sir kindly send the solution as i am not able to get the exact answer.Thank you

Hey Dhruv,

Share the link of your updated code here and we will help you to rectify your mistakes in that.

Please don’t ask for the direct code because it will not help you in developing your logic building and problem solving skills. Always send the code that you have written for the problem and ask the TAs to tell you the mistakes… if still that doesn’t work share your updated code and ask them to look into it again.

https://ide.codingblocks.com/s/68067 here it is. i wont ask for the code again but help me out here

Dhruv u can also do in easy way
x^k=n take log both side of base of base 10
k*log(x)=log(n)
log(x)=log(n)/k
take power of 10 both side
x=10^(log(n)/k)
hence this is the ans
just use log function from math
ur binary search is also right just adjust ur search space according to above relation
hope this help:)

Hey Dhruv,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.