20211217使用python3通过最近6期的双色球开奖结果预测新一期的号码
酬金/劳务费用:小奖请吃饭。
大奖给你技术支持费用!
按照你如今加班工资的2倍计酬!
第一步,希望2周完成,大概完成时间2021-12-15:
a1*x1+a2*x2+a3*x3+a4*x4+b5*x5+a6*x6+a7*x7=M
b1*x1+b2*x2+b3*x3+b4*x4+b5*x5+b6*x6+b7*x7=M
……
g1*x1+g2*x2+g3*x3+g4*x4+g5*x5+g6*x6+g7*x7=M
你可以使用任何方法完成解方程。(C/C++/MATLAB等等)
数学建模Lingo编程
算法可以使用(但是不限于)《运筹学》中的回归分析!
暂定M=1000。
第二步:元旦前完成。
M未知,需要8个方程组来解方程!
a1*x1+a2*x2+a3*x3+a4*x4+b5*x5+a6*x6+a7*x7=M
b1*x1+b2*x2+b3*x3+b4*x4+b5*x5+b6*x6+b7*x7=M
……
g1*x1+g2*x2+g3*x3+g4*x4+g5*x5+g6*x6+g7*x7=M
h1*x1+h2*x2+h3*x3+h4*x4+h5*x5+h6*x6+h7*x7=M
第三步:2021年底,2022年春节完工。
M未知,N未知。N不超过M的10%。
M-N<a1*x1+a2*x2+a3*x3+a4*x4+b5*x5+a6*x6+a7*x7<M+N
M-N<b1*x1+b2*x2+b3*x3+b4*x4+b5*x5+b6*x6+b7*x7<M+N
……
M-N<g1*x1+g2*x2+g3*x3+g4*x4+g5*x5+g6*x6+g7*x7<M+N
M-N<h1*x1+h2*x2+h3*x3+h4*x4+h5*x5+h6*x6+h7*x7<M+N
@python小韵老师 @python小韵老师 最近再学习 《运筹学》
a1*x1+a2*x2+a3*x3+a4*x4+b5*x5+a6*x6+a7*x7=M
b1*x1+b2*x2+b3*x3+b4*x4+b5*x5+b6*x6+b7*x7=M
……
g1*x1+g2*x2+g3*x3+g4*x4+g5*x5+g6*x6+g7*x7=M
M=1000
请问 老师会讲 怎么解 多元一次方程组吗?
运筹学
线性代数 都会用到!
以前使用MATLAB做的。
现在学习PYTHON,想 学以致用,能否 请
参考资料:
https://blog.csdn.net/qq_24395387/article/details/103370434
python解多元一次方程
20191203-python解多元一次方程
红球 杀号定胆
https://zst.cjcp.com.cn/shdd/ssq-hq.html
双色球红球杀号
https://datachart.500.com/ssq/?expect=100
号码走势
python多层for嵌套循环
python for
https://www.cnblogs.com/my-essay/p/11078972.html
python:for循环
python 双 判断
https://www.cnblogs.com/zhang-ping1205/p/12960299.html
python的if判断&两重判断
03 07 10 14 21 24
11 14 15 16 27 32
12 14 19 23 24 27
05 10 16 26 27 33
01 14 19 23 26 30
04 07 17 19 20 24
01 09 11 13 20 29
03,07,10,14,21,24
11,14,15,16,27,32
12,14,19,23,24,27
05,10,16,26,27,33
01,14,19,23,26,30
04,07,17,19,20,24
01,09,11,13,20,29
[03,07,10,14,21,24],
[11,14,15,16,27,32],
[12,14,19,23,24,27],
[05,10,16,26,27,33],
[01,14,19,23,26,30],
[04,07,17,19,20,24],
[01,09,11,13,20,29],
rootroot@rootroot-System-Product-Name:~$
rootroot@rootroot-System-Product-Name:~$ import numpy as np
import-im6.q16: unable to open X server `localhost:10.0' @ error/import.c/ImportImageCommand/359.
rootroot@rootroot-System-Product-Name:~$
rootroot@rootroot-System-Product-Name:~$ python3
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import numpy as np
>>>
>>> m = np.array([[11,14,15,16,27,32],\
... [12,14,19,23,24,27],\
... [5,10,16,26,27,33],\
... [1,14,19,23,26,30],\
... [4,7,17,19,20,24],\
... [1,9,11,13,20,29]])
>>>
>>> m
array([[11, 14, 15, 16, 27, 32],
[12, 14, 19, 23, 24, 27],
[ 5, 10, 16, 26, 27, 33],
[ 1, 14, 19, 23, 26, 30],
[ 4, 7, 17, 19, 20, 24],
[ 1, 9, 11, 13, 20, 29]])
>>>
>>>
>>> n = np.array([1000, 1000, 1000, 1000, 1000, 1000])
>>> n
array([1000, 1000, 1000, 1000, 1000, 1000])
>>>
>>>
>>>
>>> for x1 in range(1, 31):
... for x2 in range(1, 31):
... for x3 in range(1, 31):
... for x4 in range(1, 31):
... for x5 in range(1, 31):
... for x6 in range(1, 31):
... if( 999 < x1*solution[0] + x2*solution[1] + x3*solution[2] + x4*solution[3] + x5*solution[4] + x6*solution[5] < 1001 ):
... print(x1, x2, x3, x4, x5, x6)
...
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
NameError: name 'solution' is not defined
>>>
>>>
>>> solution = np.linalg.solve(m, n)
>>>
>>>
>>> solution
array([ 6.55874456, -11.53254608, 53.52310941, -11.88185918,
-51.70355309, 58.51776544])
>>>
>>>
[BEGIN] 2021/12/16 18:24:48
>>>
>>>
>>>
>>> for x1 in range(1, 27):
... for x2 in range(x1+1, 28):
... for x3 in range(x2+1, 29):
... for x4 in range(x3+1, 30):
... for x5 in range(x4+1, 31):
... for x6 in range(x5+1, 32):
... if( 999.9 < x1*solution[0] + x2*solution[1] + x3*solution[2] + x4*solution[3] + x5*solution[4] + x6*solution[5] < 1000.1 ):
... print(x1, x2, x3, x4, x5, x6)
...
1 2 3 7 9 24
1 2 4 6 8 22
1 2 10 13 16 25
1 2 11 12 15 23
1 2 17 19 23 26
1 3 5 6 19 31
1 3 7 11 12 24
1 3 7 15 19 31
1 3 8 10 11 22
1 3 15 16 18 23
1 4 11 19 22 31
1 4 12 18 21 29
1 4 19 24 28 30
1 5 8 17 18 30
1 5 9 16 17 28
1 5 15 23 25 31
1 5 16 22 24 29
1 5 17 21 23 27
1 6 20 26 27 29
1 6 21 25 26 27
1 8 14 15 24 30
1 9 10 14 21 31
1 9 11 13 20 29
1 9 18 19 27 30
1 10 15 17 23 29
1 11 13 14 18 26
1 13 15 19 23 30
1 13 22 25 30 31
1 14 19 23 26 30
1 14 20 22 25 28
1 15 16 21 22 29
1 15 17 20 21 27
1 15 23 27 29 30
2 3 9 13 16 26
2 3 10 12 15 24
2 3 16 19 23 27
2 3 17 18 22 25
2 4 6 11 12 25
2 4 7 10 11 23
2 4 8 9 10 21
2 4 14 16 18 24
2 5 11 18 21 30
2 5 18 24 28 31
2 6 7 17 18 31
2 6 8 16 17 29
2 6 15 22 24 30
2 6 16 21 23 28
2 7 19 26 27 30
2 7 20 25 26 28
2 7 21 24 25 26
2 9 13 15 24 31
2 10 11 12 19 28
2 10 17 19 27 31
2 11 14 17 23 30
2 11 15 16 22 28
2 11 21 23 30 31
2 12 19 20 25 28
2 15 18 23 26 31
2 15 19 22 25 29
2 16 22 27 29 31
2 16 23 26 28 29
3 4 7 14 17 29
3 4 8 13 16 27
3 4 9 12 15 25
3 4 15 19 23 28
3 4 16 18 22 26
3 5 6 10 11 24
3 5 7 9 10 22
3 5 12 17 19 27
3 5 13 16 18 25
3 5 14 15 17 23
3 5 20 22 25 26
3 6 8 9 21 31
3 6 17 20 21 25
3 6 18 19 20 23
3 7 12 13 24 31
3 7 14 22 24 31
3 8 18 26 27 31
3 8 19 25 26 29
3 11 17 18 26 30
3 12 13 17 23 31
3 12 14 16 22 29
3 12 21 22 29 30
3 13 18 20 25 29
3 14 15 18 21 28
3 14 16 17 20 26
3 15 20 21 23 26
3 17 22 26 28 30
4 5 6 14 17 30
4 5 7 13 16 28
4 5 8 12 15 26
4 5 13 20 24 31
4 5 14 19 23 29
4 5 15 18 22 27
4 6 11 17 19 28
4 6 12 16 18 26
4 6 13 15 17 24
4 6 19 22 25 27
4 6 20 21 24 25
4 7 16 20 21 26
4 7 17 19 20 24
4 8 21 27 30 31
4 9 18 25 26 30
4 10 13 14 22 29
4 12 16 18 26 31
4 13 20 22 29 31
4 14 17 20 25 30
4 14 18 19 24 28
4 15 21 24 28 30
4 15 22 23 27 28
4 16 19 21 23 27
4 18 21 26 28 31
5 6 13 19 23 30
5 6 14 18 22 28
5 6 20 25 30 31
5 7 10 17 19 29
5 7 11 16 18 27
5 7 12 15 17 25
5 7 17 23 26 30
5 7 18 22 25 28
5 7 19 21 24 26
5 8 15 20 21 27
5 8 16 19 20 25
5 8 17 18 19 23
5 9 11 12 23 31
5 10 15 16 26 31
5 10 17 25 26 31
5 11 12 14 22 30
5 15 16 20 25 31
5 15 17 19 24 29
5 16 20 24 28 31
5 16 21 23 27 29
5 17 18 21 23 28
5 17 19 20 22 26
5 18 23 24 25 26
6 7 12 19 23 31
6 7 13 14 15 22
6 7 13 18 22 29
6 7 20 24 29 30
6 8 9 17 19 30
6 8 10 16 18 28
6 8 16 23 26 31
6 8 17 22 25 29
6 8 18 21 24 27
6 9 14 20 21 28
6 9 15 19 20 26
6 9 21 26 28 29
6 13 16 17 24 29
6 17 20 23 27 30
6 17 21 22 26 28
6 19 22 24 25 27
6 21 24 29 30 31
7 8 12 14 15 23
7 8 19 20 22 24
7 8 19 24 29 31
7 9 16 22 25 30
7 10 12 21 22 31
7 10 13 20 21 29
7 10 14 19 20 27
7 10 20 26 28 30
7 10 21 25 27 28
7 12 14 15 25 31
7 13 18 19 28 31
7 14 15 17 24 30
7 16 17 18 22 27
7 18 19 23 27 31
7 19 23 27 30 31
7 20 21 24 25 28
7 20 22 23 24 26
8 9 11 14 15 24
8 9 12 13 14 22
8 9 18 20 22 25
8 10 15 22 25 31
8 11 12 20 21 30
8 11 13 19 20 28
8 11 19 26 28 31
8 11 20 25 27 29
8 16 18 21 27 31
8 16 19 20 26 29
8 20 23 26 29 30
9 10 11 13 14 23
9 10 17 20 22 26
9 10 18 19 21 24
9 12 19 25 27 30
9 16 21 22 30 31
9 17 18 20 26 30
9 18 22 24 29 30
9 19 20 21 24 27
9 21 22 26 29 31
10 11 16 20 22 27
10 11 17 19 21 25
10 12 21 23 24 25
10 13 18 25 27 31
10 14 22 29 30 31
10 19 21 24 29 31
10 19 22 23 28 29
11 12 14 21 23 30
11 12 15 20 22 28
11 12 16 19 21 26
11 13 19 24 25 28
11 13 20 23 24 26
11 13 21 22 23 24
11 20 21 23 28 30
11 22 23 24 26 27
12 13 14 20 22 29
12 13 15 19 21 27
12 13 21 26 29 30
12 14 18 24 25 29
12 14 19 23 24 27
12 14 20 22 23 25
13 14 20 26 29 31
13 14 21 25 28 29
13 15 17 24 25 30
13 15 18 23 24 28
13 15 19 22 23 26
14 15 20 25 28 30
14 16 17 23 24 29
19 20 21 28 29 31
19 20 22 27 28 29
20 21 22 26 27 28
[END] 2021/12/16 18:25:14
我已经帮你全部给对了,就中了20元