Unable to do the question


this is my code pls check and comment the error

Hello @Shubham800 as the test cases are larger so you have to use the fast exponentiation method by which you can compute the powers in log(n) time.
if you need any help in that you can ask here:

pls send your code as my code is giving wrong ans

@Shubham800 check this:


if you have any doubt you can ask here:
Happy Learning!!

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.

if you have any doubt you can ask here: