8. There are three piles of weights, the first pile where each weight is 3 grams, the second pile where each weight is 5 grams, and the third pile where each weight is 7 grams. Please take the minimum number of weights so that their total weight is 130 grams. Write down the method: How many weights are needed? How many 3-gram, 5-gram, and 7-gram weights are there?
8.【Solution】To simplify the problem, we first analyze the relationship between the three piles of weights. Clearly, a 3-gram weight plus a 7-gram weight equals two 5-gram weights (both are 10 grams). Therefore, if we replace two 5-gram weights with one 3-gram weight and one 7-gram weight, the number and total weight of the weights remain unchanged. This way, we can replace the 5-gram weights in pairs until only one 5-gram weight or no 5-gram weights are left.

The problem is reduced to the following two scenarios:
(1) The selected weights do not include any 5-gram weights. Clearly, to minimize the number of weights taken, we should take as few 3-gram weights as possible. The remaining weight after subtracting the total weight of the 3-gram weights from 130 grams should be a multiple of 7 grams. By calculation, we can see that taking 0, 1, 2, 3, 4, or 5 3-gram weights leaves a remainder that is not a multiple of 7 grams. If we take 6 3-gram weights, then 130 grams - 3 grams × 6 = 112 grams = 7 grams × 16. Thus, we can take 16 7-gram weights and 6 3-gram weights, totaling 22 weights.
(2) The selected weights include one 5-gram weight. Then the total weight of the 3-gram and 7-gram weights is 130 grams - 5 grams = 125 grams. Similar to the first scenario, we can calculate that we should take 2 3-gram weights and 17 7-gram weights, making a total of 17 + 2 + 1 = 20 weights.

Comparing the two scenarios above, we find that the minimum number of weights to be taken is 20. The method can be like the second scenario: 2 3-gram weights, 1 5-gram weight, and 17 7-gram weights. Of course, we can also replace two 5-gram weights with one 3-gram and one 7-gram weight, for example, taking 5 5-gram weights and 15 7-gram weights.