int quickpow(int a,int q) { int res=1; while(q>0) { if(q&1) res*=a;//判断q的奇偶性 a*=a; b>>=1; } return res; }