额。。。
编译都过不了
#include<bits/stdc++.h>
using namespace std;
int num=0;
int Fast_Power(int x, int y, int z){
if(y==0) return 1;
if(y==1) return x%z;
if(y%2==0){
return Fast_Power(x%z, y/2%z)%z*Fast_Power(x%z, y/2%z)%z;
}
else{
return x*Fast_Power(x%z, y/2%z)%z*Fast_Power(x, y/2)%z;
}
}
int main(){
int a, b, c;
cin >> a >> b >> c;
cout << Fast_Power(a, b, c);
return 0;
}
‘’‘