逆元

线性预处理逆元

inv[1]=1;
for(int i=2;i<=n;i++)
   inv[i]=(p-p/i)*inv[p%i]%p;

 

posted @ 2018-09-10 17:40  ASDIC减除  阅读(74)  评论(0编辑  收藏  举报