int MOD(int a, int b, int p) //a^b(modp)的值 逐次平方法{ int result = 1; while (b) { result = result * a % p; a = a * a % p; b >>= 1; } return result;}