Kthroot problem TLE on test case 2

i’m unable to understand how to further optimise my code and what test case made it. TLE Here’s the link of my code pls help me in optimising the func

You can try cases like where n and k are :- 1000000000000000 1, it will given TLE
Try using binary search or something else.