Wrong answer in 1 test case

#include
using namespace std;
int main() {
int a,b,c,d=1;
cin>>a>>b>>c;
a=a%c;
if(b==0){
cout<<d;
return 0;
}
for(int i=0;i<b;i++){
d=(d*a)%c;
}
cout<<d;
return 0;
}

I have edited your code, try to submit now, instead of int , use long long int, I have made the changes, refer to the code now,

Since, you arent replying anything, I am marking this doubt as resolved… You can reopen it if u still face any issues.