Riddle: There are ten bags containing marbles. Each bag has at least 10 marbles in it. Nine of the bags contains only marbles weighting 10 grams each. One of the bags contains only marbles weighing nine grams each. Each bag has a different number of marbles in it. All of the marbles look exactly the same. The riddle is how can you know which bag has the nine gram marbles if the only device allowed to be used is a weighing scales which you can use only once?
Answer: Place the bags in a row. Take one marble from the first bag, two from the second bag and so on. Use the scales to weigh all the marbles you have taken from the bags. If the number of grams ends in 9, it is the first bag with 9 gram marbles. The total for the other bags will end in 0 since 10s are being added. The single 9 shows up as the rightmost digit in the sum of all the weights. If the number of grams ends in 8, it is the second bag with the 9 gram marbles because 2 times 9 equals 18 and that will be added to the total producing a number ending in 8. A rightmost 7 means it is the third bag with the 9 gram marbles. In each case the rightmost digit reveals which bag contains the 9 gram marbles.
Put all 55 marbles that you selected from the bags together on the balance. The number of grams that the total weight of these 55 marbles differs from 550 grams, is equal to the number of marbles of 9 grams that are among those 55 marbles, and that is equal to the number of the bag which contains only marbles of 9 grams