![](https://img-blog.csdnimg.cn/20190918140053667.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数论-费马小定理(逆元)
数论
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
逆元(费马小定理求法)
/*求逆元费马小定理a^(p-1)=1(mod p)故a^(p-2)=1/a(mod p)inv(a)(a关于p的逆元)=a^(p-2)*/ #include<cstdio>#include<algorithm>#include<cstring>#include<cmath>#include<string>#...转载 2019-11-12 20:17:15 · 196 阅读 · 0 评论 -
Fansblog (HDU - 6608)(威尔迅定理+费马小定理)
Farmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, he find the visits has reached P , which is a prime number.He thinks it is a interesting fact...原创 2019-11-12 20:14:43 · 178 阅读 · 0 评论