Problem with m code

i wrote my code but it is throwing wrong ans for very large int . i think long long int is overflowing . plz tell me correct way to solve this problem.(i am unable to understand editorial)

Hey @pratik.win instead of rt function you are making, use pow(mid,k) as try for this input
1
1000000000000000 10
You will get your mistake. If this solves your query, mark it as resolved.

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.