预处理逆元:模板

inv[i]=(M-M/i)*inv[M%i]%M
原文地址:https://www.cnblogs.com/autsky-jadek/p/7769055.html