注意必须从2开始递推,好像1不满足这个性质
inv[0]=inv[1]=1; go(i,2,n){ inv[i]=(P-P/i)*inv[P%i]%P; }
线性求逆元【转】
原文:https://www.cnblogs.com/White-star/p/11568030.html