快速幂 求a的b次方 long pow(int a,int b){ long x = a; long res = 1;//保存a^b的结果 while(b > 0){ if(b&1)//b的最后一位二进制位是1 res *= x; b >>= 1; x = x*x; } return res; }