会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Leo's blog
Wish this blog finds the essence of you, and finds you well.
博客园
首页
新随笔
联系
订阅
管理
2019年10月28日
求乘法逆元的几种方法
摘要: [toc] 求模意义下一个数的乘法逆元有多种方法. 方法1 利用裴蜀定理(扩展欧几里得算法)。 直接解线性方程$ax+bp=1$, 可知$a^{ 1}=x$. 方法2 利用费马小定理。 对任意素数$p$, 若$a using namespace std; define ll long long co
阅读全文
posted @ 2019-10-28 20:48 懿路智行
阅读(852)
评论(0)
推荐(0)
编辑
公告