here is the code https://ide.codingblocks.com/s/208299
Pls help time limit exeded
Yash, you need to solve this question using the binary search as
while(beg<=end)
{
mid=(beg+end)/2;
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;
}
}
cout<<x<<endl;