Current location - Training Enrollment Network - Mathematics courses - Except math.
Except math.
This is a problem of number theory, and it is about the solution of indefinite equations. For a special case, it is Han Xin's point soldier.

This ingenious algorithm is called "Ghost Valley Calculation", "Partition Calculation", or "Han Xin Point Soldiers", and foreigners call it "Chinese Remainder Theorem". It is called "Sun Tzu Theorem" in number theory. Cheng Dawei, a mathematician in Ming Dynasty (1593), summed up this algorithm with poems. He wrote:

Three people walk seventy, five trees and twenty-one sticks,

Seven sons reunited in the middle of the month and didn't know until 105.

That is, the remainder of 3 is multiplied by 70, the remainder of 5 is multiplied by 2 1, and the remainder of 7 is multiplied by 15, and then they are added and subtracted from 105 to get the answer.

As far as this topic is concerned:

2*70+3*2 1+4* 15-2* 105

= 140+63+60-2* 105=53

From the point of view of number theory, this is a special solution, and the general solution is a special solution ++ 105K (K k is an arbitrary integer).