Can you point out the mistake in my code?

@akash_281
Don’t use pow function as pow(mid,k) can be a very big number which will cause overflow .

Hey @aa1,
I still couldn’t solve it it seems there’s a problem in my while loop can you look into it?

@akash_281
refer to this corrected code