当a整除b 且p 为质数时
a / b % p = a * b^(p - 2) % p
int quickMi(int x, int y, int mod) {
long long ans = 1;
while (y) {
if (y & 1) {
ans = (ans * x) % mod;
}
x = ((long long)x * x) % mod;
y >>= 1;
}
return ans;
}
// 除法求模
int divideMod(int a, int b, int p) {
return (long long)a * quickMi(b, p - 2, p) % p;
}