1951: [Sdoi2010] Ancient pig wen
Seeking G^sigma{c (N, i), I | N} The value of mod m, where m = 999911659.M is a prime number, so according to Fermat theorem g^ (M-1) ≡1 (mod M).Then G^sigma{c (N, i), I | n}≡g^ (Sigma{c (N, i), I | n} mod (M-1)) ≡g^sigma{c (n, i) mod (M-1), I | N} (mod M). So we only need C (N, K) mod (M-1) and then accumulate.Note: M-1 = 2 * 3 * 4679 * 35617.So we can getP≡A1 (mod 2)P≡A2 (mod 3)P≡A3 (mod 4679)P≡A4 (mod 35617)After t

by c = 2 (n = 10) 2-32 (mod 10)
Wilson's Theorem
When and only when P is a prime number: (p-1 )! Interval-1 (mod P ).
In short, the number between {2 .. P-2} can be paired by two. The product is the same as the 1-module p.
Therefore, the concatenation part can be changed to 1, with only 1 * (PM) left. The last formula is used to verify the result.
[But why can we pair them? I haven't understood it yet. I'll understand it later.]
WilsonThe

[Description] Ask[Solution]Easy to get,So, the focus is on how to askIf P-1 is a prime number, we can enumerate all d with the time of sqrt (n) and calculate the sum by the Lucas theorem respectively.But we find that p-1=2*3*4679*35617 is not a prime number, so does Lucas ' theorem work? No, we can work out the model of 2, 3, 4679, 35617, and write four congruence equations, then solve them with grandson's

The existence theorem of inverse function
If the function y=f (x), x∈df y = f (x), x \in D_f is strictly monotonically increasing (decreasing), then there is its inverse functionX=f−1 (y): rf→x x = f^{-1} (y): R_f \rightarrow X, and f−1 (y) f^{-1} (Y) is also strictly monotonically increased (reduced). Proof:
It is advisable to set y=f (x), x∈df y = f (x), x \in d_f strictly monotonic increments, ∀x1,x2∈df,x1∀y1,y2∈df−1

Ferma's TheoremIs a theorem in number theory:
Assume thatAIs an integer,PIs a prime number, so it is a multiple of P, which can be expressed
IfANoPThis theorem can also be written as a multiple
This writing method is more commonly used.
Euler's Theorem(Also calledFerma-Euler's TheoremOrEuler's Function Theor

, when k equals a certain value, the number of characters of the pig in the face is n/k.。 However, it is also quite a lot to keep n/k from n characters. Ipig predicts that if all the possible k's cases add up to p, then the cost of studying ancient writings will be the P-th side of G. Now he wants to know what the cost of studying ancient writings in the Pig Kingdom is. Since Ipig thinks this number can be astronomical, you just need to tell him that the answer is divided by the remainder of 999

to multiplyTheoretical basis:f/a mod C =?if present a*x = 1 (mod C)//Why is 1, because the above multiplication (?) * (1) (mod 7) should be 1 This number will not changeso the 2 sides multiply at the same time, get F * X =? (mod C)Now we know that dividing by a number modulo equals multiplying the number of the inverse of the modulo is the next step is to find the inverse of the inverse element is actually to seek to make a*x = 1 (mod C) established X, where a is the divisor in the DivisionEule

Molly's theorem (Morley's theorem), also known as the three-point theorem of the Morey angle. The three inner corners of the triangle are divided into three equal points, and the two three-point lines near one side intersect to get an intersection, so that three intersections can form a positive triangle. This triangle is often called the Molly Triangle.

Abstract: This paper mainly introduces the Euler's Theorem in number theory, and then introduces the extension and application of the Euler's theorem. Combined with examples, it shows how to use the extended Euler's Theorem to implement power reduction modulo. In number theory,
Euler's theorem,(Also called ferma-
Euler

the Nyquist theorem and the re-understanding of Shannon's theorem
@ (computer network)
About the code element, first review the concept:
http://blog.csdn.net/u011240016/article/details/53333682 Nyquist theorem
Under ideal low-pass conditions – no noise, limited bandwidth channels, and a limit code element rate of 2W baud.W is the channel bandwidth, in Hz.
The nu

Examples of Chinese Remainder Theorem algorithm implemented by Python and python theorem Algorithm
This example describes the Chinese Remainder Theorem algorithm implemented by Python. We will share this with you for your reference. The details are as follows:
Chinese Remainder Theorem-CRT: Also known as Sun Tzu's

Label: Dilworth theorem poj1548 greedy
Question:
There are some places with garbage, so that the robot can only go to the right or down from the upper left corner, and ask how many times it can clean up all the garbage,
Question:
First, it is a classic question of network flow, or a bipartite graph-minimum path coverage. But now, after all, we are doing some greed. This question uses a greedy correlation t

Explanation of extended Chinese Remainder Theorem and explanation of Chinese TheoremPreface
Before reading this article, we recommend that you first learn the Chinese Remainder Theorem. In fact, it doesn't matter if you don't learn it. After all, there is no relationship between the two.Extended CRT
We know that the Chinese Remainder Theorem is used to solve the

http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1805Test instructionsA and B have a side, a and G have a B-bar, and B and G have a C-side. Now go through all the edges from point a, and then go back to point a, and ask how many ways there are.Ideas:16 Hunan Province, the title of the problem is to find the number of Euro-loop, and the count of spanning tree has a certain connection.First of all, the magic of the best theorem, which is what the devi

The idea of POJ 1006 is not very difficult and can be transformed into mathematical formula:Now num is the number of days from the next same day to the beginningP,e,i,d title in the set!Then you can get three formulas: (num + d)% = = p, (num + d)% = = e; (num + d)% = = i;P,e,i,d is our input, then we need to find Num can, for convenience, we will num+d temporarily as a whole! make x = num + D;namely: x% = = p; x% = = e; x% = = i; xWhat to do? This involves the so-called " Chinese remainder

arithmetic basic theorem : any one natural number greater than 1 N, if n is not prime , then n can be uniquely decomposed into the product of finite prime numbersN = p1^a1 * P2^A2 * p3^a3 * ... * pn^an(Wherein P1, p2 、... pn is n factor, A1, A2 、... 、 an exponent of the factor respectively)Such decomposition is called the standard decomposition of NApplication:(1) A positive integer greater than 1 N, if its standard decomposition is:N = p1^a1 * P2^A2

①②, the limit and the unequal relationship are used here.③ if a≠b, then there will be no $\lim _{n\rightarrow \infty}\left| I_n \right| =0$④ If there's still a little C inInside, then there will be no $\lim _{n\rightarrow \infty}\left| I_n \right| =0$For a closer look at the closed interval set theorem (Nested intervals theorem), see the explanation 2:http://www.cnblogs.com/imath/p/6260953.htmlClosed interv

combination on a line.Sample Input19 5 23 5Sample OUTPUT6Source2015 ACM/ICPC Asia Regional Changchun OnlineRecommendhujie | We have a carefully selected several similar problems for you:5842 5841 5840 5839 5838 Analysis: According to Lucas solution each I:C (n,m)%pi, and then according to the The state surplus theorem integrates these results. will be able to get answers. Note that the Chinese remainder theorem

Wilson's theorem, infinite monkey's Theorem
Wilson's theorem proves that if p is a prime number, p can be divisible by (p-1 )! + 1
First: First test the strange Value
If p = 2, true;
If p = 3, true;
Then we will start to study the situation where p> = 5
Second: let's prove several conclusions first.
Set A = {2, 3, 4 ,......, P-2}
Note B = {a, 2a, 3a ,......, (P

Ferma's theorem and ferma's Theorem
When p is a prime number, any integer x has xp limit x (mod p). This theorem is called The FeiMa small theorem. Where if x cannot be divisible by p, we have XP-1 limit 1 (mod p ).
After Deformation of this formula, we can get the A-1 mod p (mod p), so we can obtain the multiplicati

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.