For any positive integer $n$ denote $S(n)$ the digital sum of $n$ when represented in the decimal system. Find every positive integer $M$ for which $S(Mk)=S(M)$ holds for all integers $1\le k\le M$.
1. **Define the digital sum function \( S(n) \)**:
   The digital sum \( S(n) \) of a positive integer \( n \) is the sum of its digits when represented in the decimal system. For example, \( S(123) = 1 + 2 + 3 = 6 \).

2. **Express \( M \) in its decimal form**:
   Let \( M = \sum_{i=0}^{n} a_i \cdot 10^i \), where \( 0 \le a_i \le 9 \) for all \( i \in \{0, 1, 2, \ldots, n\} \) and \( a_n \neq 0 \).

3. **Consider the condition \( S(Mk) = S(M) \) for all \( 1 \le k \le M \)**:
   We need to find all positive integers \( M \) such that the digital sum of \( Mk \) is equal to the digital sum of \( M \) for all \( k \) in the range \( 1 \le k \le M \).

4. **Analyze the form of \( M \)**:
   Let's consider \( M \) of the form \( 10^l - 1 \) for some positive integer \( l \). This means \( M = 999\ldots9 \) (with \( l \) nines).

5. **Verify the condition for \( M = 10^l - 1 \)**:
   - For \( M = 10^l - 1 \), we have \( S(M) = 9l \) because the sum of the digits of \( 999\ldots9 \) (with \( l \) nines) is \( 9 \times l \).
   - Consider \( Mk \) where \( 1 \le k \le M \). We need to show that \( S(Mk) = 9l \).

6. **Calculate \( S(Mk) \)**:
   - Let \( t = k \). Then \( Mk = t(10^l - 1) = t \cdot 10^l - t \).
   - The number \( t \cdot 10^l \) has the same digits as \( t \) followed by \( l \) zeros.
   - Subtracting \( t \) from \( t \cdot 10^l \) results in a number where the digits of \( t \) are repeated \( l \) times.
   - The sum of the digits of \( t(10^l - 1) \) is \( l \) times the sum of the digits of \( t \).

7. **Check the sum of digits**:
   - Since \( t \le 10^l - 1 \), the sum of the digits of \( t \) is at most \( 9l \).
   - Therefore, the sum of the digits of \( t(10^l - 1) \) is \( l \times \) (sum of the digits of \( t \)).
   - For \( S(Mk) = S(M) \) to hold, the sum of the digits of \( t \) must be \( 9 \), and since \( t \) can be any number from \( 1 \) to \( 10^l - 1 \), this condition is satisfied.

8. **Conclusion**:
   - The only \( M \) that satisfies \( S(Mk) = S(M) \) for all \( 1 \le k \le M \) is of the form \( 10^l - 1 \).

The final answer is \( \boxed{ M = 10^l - 1 } \) for \( l \in \mathbb{N} \).