![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
文章平均质量分 57
AC之路
这个作者很懒,什么都没留下…
展开
-
POJ 1969---Count on Canton【数学问题】
A - Count on Canton Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Description One of the famous proofs of modern mathematics is Georg Can原创 2014-07-29 10:00:34 · 720 阅读 · 0 评论 -
POJ 1006---Biorhythms【中国剩余定理】
Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 78980 Accepted: 23740 Description Some people believe that there are three cycles in a person'转载 2014-07-29 19:53:26 · 607 阅读 · 1 评论 -
【辗转相除法求最大公约数】
原理 设两数为a、b(b 第一步:令c=gcd(a,b),则设a=mc,b=nc 第二步:根据前提可知r =a-kb=mc-knc=(m-kn)c 第三步:根据第二步结果可知c也是r的因数 第四步:可以断定m-kn与n互素【否则,可设m-kn=xd,n=yd,(d>1),则m=kn+xd=kyd+xd=(ky+x)d,则a=mc=(ky+x)dc,b=nc=ycd,故原创 2014-08-06 19:55:52 · 461 阅读 · 0 评论 -
【快速幂取模】HDU 1061---Rightmost Digit
Rightmost Digit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31816 Accepted Submission(s): 12177 Problem Description Given a原创 2014-08-06 09:17:22 · 378 阅读 · 1 评论 -
【快速幂取模】HDU 2035---人见人爱A^B
人见人爱A^B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22141 Accepted Submission(s): 15450 Problem Description 求A^B的最后三位数表示的整数。原创 2014-08-06 09:29:43 · 345 阅读 · 0 评论 -
POJ 1183---反正切函数的应用【数学问题】
反正切函数的应用 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 10739 Accepted: 3890 Description 反正切函数可展开成无穷级数,有如下公式 (其中0 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算P原创 2014-07-29 21:03:35 · 377 阅读 · 0 评论 -
【求素数的三种方法】
#include #include #include using namespace std; const int M=1000005; int prime[1000005]; int flag[1000005]; int p; int main() { int l,u,x,y; int i, j; p原创 2014-08-05 20:37:33 · 592 阅读 · 0 评论