Why Am I getting wrong answer?

Passing the sample test case.
Plz check :- https://ide.codingblocks.com/s/234182

I think you have shared the code for some other question, please recheck once.

I have edited the link. Plz check

Check the changes I made, I think there must be some issue with significant digits is decimal value as pow() returns decimal value so you should typecast it to int. Tell me if it works.

Still getting wrong ans

Check for this one, here I defined my own function for power to ensure that value is returned in int only.

Is the sample test case 0 same as the example case given in question ? Even that test case is not getting passed.

I can’t find anything wrong in the logic.

Did you try submitting this one? It should pass on test case 0.

Yes. Still getting WA.