Let $m$ and $n$ be positive integers where $m$ has $d$ digits in base ten and $d\leq n$. Find the sum of all the digits (in  base ten) of the product $(10^n-1)m$.
1. Let \( m \) be a positive integer with \( d \) digits in base ten. This means \( m \) can be written as \( m = \overline{a_1a_2 \ldots a_d} \), where \( a_i \) are the digits of \( m \).

2. We need to find the sum of all the digits of the product \( (10^n - 1)m \), where \( d \leq n \).

3. First, consider the expression \( 10^n - 1 \). This is a number consisting of \( n \) digits, all of which are 9. For example, if \( n = 3 \), then \( 10^3 - 1 = 999 \).

4. Now, multiply \( m \) by \( 10^n - 1 \):
   \[
   (10^n - 1)m = (10^n - 1) \cdot m
   \]

5. Expanding the product, we get:
   \[
   (10^n - 1)m = 10^n \cdot m - m
   \]

6. Let \( m = \overline{a_1a_2 \ldots a_d} \). Then:
   \[
   10^n \cdot m = \overline{a_1a_2 \ldots a_d} \cdot 10^n
   \]
   This shifts the digits of \( m \) to the left by \( n \) places, adding \( n \) zeros at the end.

7. Subtracting \( m \) from this, we get:
   \[
   (10^n \cdot m) - m = \overline{a_1a_2 \ldots a_d} \cdot 10^n - \overline{a_1a_2 \ldots a_d}
   \]

8. This can be written as:
   \[
   \overline{a_1a_2 \ldots a_d000 \ldots 0} - \overline{a_1a_2 \ldots a_d}
   \]

9. When we perform this subtraction, the result is a number where each digit of \( m \) is subtracted from 9, and there are \( n - d \) nines in the middle. For example, if \( m = 123 \) and \( n = 5 \), then:
   \[
   (10^5 - 1) \cdot 123 = 99999 \cdot 123 = 12300000 - 123 = 12299877
   \]

10. The sum of the digits of this result can be broken down into three parts:
    - The sum of the digits of \( m \) subtracted from 9.
    - The \( n - d \) nines in the middle.
    - The sum of the digits of \( m \).

11. For each digit \( a_i \) of \( m \), the corresponding digit in \( 999 \ldots 9 - m \) is \( 9 - a_i \). Therefore, the sum of these digits is:
    \[
    \sum_{i=1}^d (9 - a_i)
    \]

12. The \( n - d \) nines in the middle contribute:
    \[
    9(n - d)
    \]

13. Adding these together, we get the total sum of the digits:
    \[
    \sum_{i=1}^d (9 - a_i) + 9(n - d) + \sum_{i=1}^d a_i
    \]

14. Simplifying, we get:
    \[
    9d - \sum_{i=1}^d a_i + 9(n - d) + \sum_{i=1}^d a_i = 9d - \sum_{i=1}^d a_i + 9n - 9d + \sum_{i=1}^d a_i = 9n
    \]

15. Therefore, the sum of all the digits of the product \( (10^n - 1)m \) is \( 9n \).

\(\blacksquare\)

The final answer is \( \boxed{ 9n } \)