Not able to figure out error in my code

you are calculating pow(mid,k)
where 1<=K<=10^4 so it give value which are out of range of int long long as well that the error