K th root question

I am getting time limit error in one case
here is my code

@Shivam_mehta_2954
You are supposed to use Binary Search to optimise since the contraints are very large.