
数论-质数判定
西行妖下的亡灵
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Miller Rabin质数判定模板(2)
首先介绍一个相关的引理。和总是得到1,称这两个数为1的“平凡平方根”。当p是素数且p>2时,不存在的“非平凡平方根”。为了证明该引理,我们假设x是的平方根,于是有[1]推出p|(x+1)(x-1),也就是说,p|x+1或p|x-1。现在假设n是一个奇素数,且 n>2。于是n-1是一个偶数,可以被表示为...原创 2019-08-14 01:14:28 · 258 阅读 · 0 评论 -
HDU 6608 FansBlog(粉丝博客)(MillerRabin算法+威尔逊算法)
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-08-03 02:01:19 · 165 阅读 · 0 评论 -
FZU code carnival-GCDLCM (最大公约数与最小公倍数)(Miller Rabin质数判定)
题目描述In FZU ACM team, BroterJ and Silchen are good friends, and they often play some interesting games.在福建大学ACM队伍里,J大哥和SilchenS是好朋友,他们经常一块玩有趣的游戏。One day they play a game about GCD and LCM. firstly...原创 2019-05-07 16:20:12 · 235 阅读 · 0 评论