Can't find answer for larger cases

#include
#include<math.h>

using namespace std;

bool is_possible(long long int n, long long int k, long long int mid){

int number=1;

for(int i=1; i<=k; i++){

	if(number*mid>n){
		return false;
	}

	number*=mid;

}

return true;

}

int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	long long int n,k,ans;
	cin>>n>>k;

	int s=0;
	int e=n;

	while(s<=e){

		long long int mid=(s+e)/2;

		if(is_possible(n,k,mid)){
			ans=mid;
			s=mid+1;

		}

		else{
			e=mid-1;
		}

	}

	cout<<ans;


return 0;

}

hello @rachitbansal2500

remove these two lines

shrink ur search space to avoid overflow
i guess s=0 e=10000000 should work fine

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.

It is still the same. Isn’t working for any test case now + TLE

@rachitbansal2500
pls share ur updated code…
i will check