''' 鸡兔同笼问题: 头:35 腿:94 求多少只鸡与兔 x+y=35 2x+4y=94 ''' import numpy as np a=np.array([[1,1],[2,4]]) b=np.array([35,94]) y=np.linalg.solve(a,b) print(y)
''' 鸡兔同笼问题: 头:35 腿:94 求多少只鸡与兔 x+y=35 2x+4y=94 ''' import numpy as np a=np.array([[1,1],[2,4]]) b=np.array([35,94]) y=np.linalg.solve(a,b) print(y)
转载于:https://www.cnblogs.com/liangliangzz/p/10223846.html