有公式 a / b % mod = a %(mod * b)/b
mod必须为素数
LL inv(LL i)//mod必须是素数 {if(i==1)return 1;return (mod-mod/i)*inv(mod%i)%mod; }