Sam writes down the numbers 1, 2, 3, ..., 99



(a) How many digits did Sam write, in total?

(b) Sam chooses one of the digits written down, at random. What is the probability that Sam chooses a 0?

(c) What is the sum of all the digits that Sam wrote down?

(a) The numbers from 1 to 9 have one digit each, so that's 9 digits. The numbers 10 to 99 have two digits each, so that's 90 x 2 = 180 digits. Therefore, Sam wrote a total of 9 + 180 = 189 digits.

(b) Sam wrote down only one 0, which is the number 10. Therefore, the probability of choosing a 0 is 1/189.

(c) To find the sum of all the digits Sam wrote down, we need to first find the sum of the digits from 1 to 9, and then multiply that sum by the number of times each digit appears in the numbers from 10 to 99. The sum of the digits from 1 to 9 is 1+2+3+4+5+6+7+8+9 = 45. Each digit appears the same number of times (10 times) in the numbers from 10 to 99, so the sum of the digits that Sam wrote down is 45 x 10 x 2 = 900.

(b) of the 189 digits, 9 are 0, so P(0) = 9/189