Measuring Scale

You have 10 unlimited piles of balls and one measuring scale. All balls in a pile have the same weight which is an integer between 1 and 9 grams. How many measurements do you need in order to find the weight of the balls in every pile?


You need only one measurement - take 1 ball from pile 1, 10 balls from pile 2, 100 balls from pile 3, etc, and measure their total weight. The first digit of the number shown on the scale determines the weight of the balls in the 10th pile, the second digit determines the weight of the balls in the 9th pile and so on.