2013年7月18日

POJ3641-Pseudoprime numbers(快速幂取模)

摘要: 题目大意 判断一个数是否是伪素数 题解 赤果果的快速幂取模。。。。 代码: #include#includeusing namespace std;#define LL long longLL mul_mod(LL a,LL b,int n){ return a*b%n;}LL pow_mod(LL a,LL p,LL n){ if(p==0) return 1; LL ans=... 阅读全文

posted @ 2013-07-18 09:47 仗剑奔走天涯 阅读(229) 评论(0) 推荐(0) 编辑

导航