Problem in code

#include
#include<math.h>
using namespace std;
int main(){
long long int a,b,c;
cin>>a>>b>>c;
long long int p=pow(a,b);
long long int ans=p%c;
cout<<ans<<endl;
return 0;
}
what is wrong in this code

do u get a wrong answer?

yes only 3 test cases are passing

check my code u need to reduce time complexity for the program
my code does it in O(log N ) time

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.