That's certainly one way to do it, but for computers that's not necessarily the easiest way. So another way of solving it is to do something we already saw last time, which is basically, why not simply enumerate all possible examples and check them?
将一个等式代入另一个等式,这当然是一种办法,但是对电脑来说这绝对不是一件简单的事,所以解决这个问题的办法,正如我们上一次看过的,非常基本?
System of linear equations. What are the equations here? Well, I could say, you know, the number of pigs plus the number of 20 chickens equals 20, right? Because we've got 20 heads. And then what else do I have?
如何解决这个问题呢?,用线性方程式的办法来解决,等式是什么呢?你应该知道,猪的数量加鸡的数量等于,对吧?因为我们有20个头?
应用推荐