其中$n$为幂的指数
int power(int a, int b) { int s = 1; while (b) { if (b & 1) s *= a; a *= a; b >>= 1; } return s; }