#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;
}