题目链接:http://acm.ocrosoft.com/problem.php?cid=1172&pid=24
2 10 9
2^10 mod 9=7
#include
using namespace std;
typedef long long ll;
ll pow(ll base,ll n,ll mod){
ll ans=1;
while(n){
if(n&1){
ans*=base;
}
ans%=mod;
base*=base;
base%=mod;
n>>=1;
}
return ans;
}
int main(){
int b,p,k;
cin>>b>>p>>k;
cout<