showing error why ?
Kth root -problem
hello @divyam_13
u r printing only when pow(mid,k)==n.
but there may be cases where such condition never exist,in such cases u need to print nearest value.
so for that use one variable to store value such that val^k<=n
check ur updated code->