![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
文章平均质量分 76
974792789
不要在能吃苦的年纪追求安逸。
展开
-
Just the Facts uva
Just the Facts The expression N!, read as ``N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for example,NN!01原创 2014-05-01 23:29:24 · 501 阅读 · 0 评论 -
Divided Land+hdu+java之大数
Divided LandTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 169 Accepted Submission(s): 91Problem DescriptionIt’s time to fig原创 2014-09-27 22:14:00 · 530 阅读 · 0 评论 -
Who Gets the Most Candies?+POJ+线段树+反素数
线段树的简单应用,反素数的求解。原创 2014-08-18 10:41:29 · 609 阅读 · 0 评论 -
Favorite Dice +SPOJ+算概率题
Favorite DiceProblem code: FAVDICEBuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an原创 2014-08-15 17:41:09 · 1036 阅读 · 0 评论 -
Instruction Decoder+SPOJ+机智题
Instruction DecoderProblem code: ICODERMathews uses a brand new 16-bit instruction processor. (Yeah i am being sarcastic!). It has one register (say R) and it supports two instru原创 2014-08-15 19:02:23 · 621 阅读 · 0 评论 -
GCD and LCM+hdu+利用gcd和lcm的性质
GCD and LCMTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1024 Accepted Submission(s): 477Problem DescriptionGiven two posit原创 2014-09-06 17:32:35 · 883 阅读 · 0 评论 -
The Cat in the Hat
Background(An homage to Theodore Seuss Geisel)The Cat in the Hat is a nasty creature,But the striped hat he is wearing has a rather nifty feature.With one flick of his wrist he pops his top of原创 2014-04-28 23:41:20 · 820 阅读 · 0 评论 -
The ? 1 ? 2 ? ... ? n = k problem uva 10025
The problemGiven the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = kFor example: to obtain k = 12 , the expression to b原创 2014-04-28 21:57:21 · 591 阅读 · 0 评论 -
大数对小数的求余和商
用到了同余定理:(a+b)%c=(a%c+b%c)%c;原创 2014-04-25 00:56:57 · 1314 阅读 · 0 评论 -
Factoring Large Numbers 关于线性筛选法打表
Factoring Large NumbersOne of the central ideas behind much cryptography is that factoring large numbers is computationally intensive. In this context one might use a 100 digit number that was a p原创 2014-05-02 21:06:21 · 589 阅读 · 0 评论 -
Uniform Generator uva
Uniform Generator Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formwhere `` " is the modulus operator.Su原创 2014-05-02 13:23:36 · 417 阅读 · 0 评论 -
Multiplying by Rotation 移位乘法 uva
Multiplying by Rotation Warning: Not all numbers in this problem are decimal numbers!Multiplication of natural numbers in general is a cumbersome operation. In some cases however the原创 2014-05-01 22:17:57 · 445 阅读 · 0 评论 -
How many zeros and how many digits?
How many zeros and how many digits?Input: standard inputOutput: standard outputGiven a decimal integer number you will have to find out how many trailing zeros will be there in its factorial i原创 2014-05-02 19:14:32 · 742 阅读 · 0 评论 -
Triangle Counting+uva+数学题
Problem GTriangle CountingInput: Standard InputOutput: Standard Output You are given n rods of length 1, 2…, n. You have to pick any 3 of them & build a triangle. How many distinct triangl原创 2014-12-29 22:27:16 · 639 阅读 · 0 评论