
数论-费马小定理(逆元)
数论
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 · 218 阅读 · 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 · 219 阅读 · 0 评论