Kth root, tle problem,but i think this is good optimised

#include<bits/stdc++.h>
using namespace std;

int kth_root(int n, int low, int high,int k){
if (low>=high){
return low;
}
int mid=(low+high)/2;
if(pow(mid,k)<=n && pow(mid+1,k)>n){
return mid;
}
else if(pow(mid,k)<n){
return kth_root(n,mid+1,high,k);
}
else{
return kth_root(n,low,mid-1,k);
}
}

int main(){
int t;
while(t–){
int n;
int k;
cin>>n>>k;
cout<<kth_root<<endl;
}
return 0;
}

hi @mvarun975_a7021058d653891d kindly share the code on ide.codingblocks.com
here the code is not readable
write, save and send the url of the page

or refer

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.