getting wrong answer for all test cases
Kth root problem wrong ans
Gautam, you are using a wrong approach in your code, You need to store the values as well.
if( pow(mid,k) == N)
{
x = mid;
break;
}
else if( pow(mid,k) <N)
{
x= mid;
beg = mid+1;
}
else if( pow(mid,k) > N)
{
end = mid-1;
}
}