Skip to content

Commit b17fce7

Browse files
committed
对质数的理解 巧思
对质数的理解 巧思
1 parent 8d15f79 commit b17fce7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
对质数的理解
2+
若 p+q = 198,则方程x²+px+q=0 的最大整数解是多少?
3+
第一 韦达定理 两根之和等于-(b/a) 两根之积等于(c/a)
4+
x₁+x₂=-p x₁*x₂=q
5+
6+
得到多项式 x₁*x₂-(x₁+x₂) = p+q
7+
再x₁*x₂-(x₁+x₂) = 198 进行因式分解
8+
x₁(x₂-1)-x₂ = 198 等式两边都加1
9+
x₁(x₂-1)-x₂+1 = 199
10+
x₁(x₂-1)-(x₂-1) = 199
11+
(x₁-1)*(x₂-1) = 199
12+
这里发现 需要两个整数相乘得到199
13+
14+
如果199是合数 199 分解质因数 这里就会有很多可能
15+
16+
但是199是质数
17+
18+
因此 只有两种可能
19+
可能1:
20+
x₁-1 = 1
21+
x₂-1 = 199
22+
可能2:
23+
x₁-1 = -1
24+
x₂-1 = -199
25+
26+
27+
第二 巧用到质数

0 commit comments

Comments
 (0)