Help needed in understanding the mistake (DOR)

Can anybody help me to understand why pow(base,exponent) function is not working. I just create my own power function then program ran successfully

Here are my solutions :

WA :
AC :

You can use (int)(pow(base,exponent)+0.5). Then it will work fine.
This is because inbuilt function return double which can give little bit different answer like 4.99999 in place of 5 etc…