Please explain why i am not getting the correct output

hello @rsumitaj
a)
put all ur logic inside this loop
image

b) dont store output of pow in any variable (it is very big value).

compare directly .i.e pow(mid,k)<=n

still not getting the output??

yeaah i tried.
a)
shrink u search space .
0 …10^7or 10^8 (handle k=1 case separately)

b) dont use pow function.
use loop to calculate mid^k . if during iteration mid^i > n break and make chnages in ur s and e

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.