快乘与快速幂
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=20;
const int mod=9901;
#define forn(i,a,b) for(int i=a;i<b;i++)
//*****************************************************************
//int a[10000000];
ll quick_mul(ll a,ll b,ll p){
ll res=0;
ll base=1;
while(b){
if(b&1)
res+=a*base%p;
b>>=1;
base=base*2%p;
}
return res;
}
ll quick_power(ll a,ll b){
ll res=1;
while(b){
if(b&1)
res=res*a%mod;
b>>=1;
a=quick_mul(a,a,mod);
}
return res;
}
int main(){
//cout<<quick_mul(2,111,10000);
cout<<quick_power(2,1024);
return 0;
}