摘要: 来源: HDU 2007-11 Programming Contest_WarmUp 题目大意:素数判定。 思路: 事实上暴力判定也可以过,但我还是用了Miller-Rabin算法。 核心思想:利用费马小定理,得到对于质数$p$,我们有$a^{p-1}\equiv 1(mod\ p)$或$a^p\e 阅读全文
posted @ 2017-08-16 09:41 skylee03 阅读(133) 评论(0) 推荐(0) 编辑