Kth root not running

https://ide.geeksforgeeks.org/4lflHIFE7r
https://online.codingblocks.com/app/player/127473/content/109889/4855/code-challenge
why it is showing tle ?how to optimise the code

Don’t use pow function as pow(mid,k) can be a very big number which will cause overflow .
Take help from this

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.