Can i know what i am missing here

i am not able to pass test case 1

Sometimes pow function leads to overflow of data type.
You can take this code for reference and implement it like this, also numbers are very very big so use long long int instead of int, rest you will under When you will see this code.

please read my code,i have used long long int and do i need to generate power calculating function

and also i have avoided using binary search as it can lead to TLE

can you please tell me what is the TEST CASE 1

Test cases are designed in such a manner that it can handle binary search. Moreover complexity of pow function is O(k) whereas that of binary search is O(logk)

Yes sure, please wait.

1 Like

I have manually checked your code and the output is same as expected. Might be an issue with the backend site Whereas i have sent you All test cases in your chat you can see that there too.

1 Like

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.