Solution for #41Let c be the number of cows purchased, p be the number of pigs purchased, and s be the number of sheep purchased. We know that the total number of animals purchased is 100. Moreover, we know that the total cost of each one adds up to $100. This gives us two equations: c + p + s = 100 If we multiply the second equation by two, that gives us: 20c + 6p + s = 200 If we take this equation and subtract the first equation, we eliminate s entirely and wind up with: 19c + 5p = 100 We can rewrite this equation like so: 100 - 19c = 5p Since c and p are constrained to positive integers, we can narrow down the possible solutions pretty quickly. We know that c cannot be 6 or higher, because then p would have to be negative for the equation to hold. So we only need to consider 1, 2, 3, 4, and 5 as possible values for c. Substituting 1, 2, 3, or 4 for c, however, results in the left-hand side of the equation being unevenly divisible by 5, which means p would have to be a non-integer for the equation to hold. So c must be 5. Substituting c allows us to solve for p: 100 - 19c = 5p Now we can substitute the values for c and p in one of the two original equations (the first is easiest) and solve for s: c + p + s = 100 The farmer purchased five cows ($50), one pig ($3), and 94 sheep ($47). |
|