30. In each of the following 6-digit positive integers: $555555,555333,818811$, 300388, every digit in the number appears at least twice. Find the number of such 6-digit positive integers.
30. Answer: 11754
First note that if every digit in the 6 -digit number appears at least twice, then there cannot be four distinct digits in the number. In other words, the number can only be formed by using one digit, two distinct digits or three distinct digits respectively. Therefore we consider three cases.
Case 1: The 6-digit number is formed by only one digit.
Then the number of such 6-digit numbers is clearly 9 .
Case 2: The 6-digit number is formed by two distinct digits.
First, the number of such 6 -digit numbers formed by two given digits $i$ and $j$, where $1 \leq i<j \leq 9$, is
$$
\binom{6}{2}+\binom{6}{3}+\binom{6}{4}=50 .
$$

Next, the number of such 6 -digit numbers formed by 0 and a given digit $i$, where $1 \leq i \leq 9$, is
$$
\binom{5}{2}+\binom{5}{3}+\binom{5}{4}=25 \text {. }
$$

Therefore the total number of such 6 -digit numbers formed by two distinct digits is
$$
\binom{9}{2} \times 50+9 \times 25=2025 .
$$

Case 3: The 6 -digit number is formed by three distinct digits. First, the number of such 6 -digit numbers formed by three given digits $i, j$ and $k$, where $1 \leq i<j<k \leq 9$, is
$$
\binom{6}{2} \cdot\binom{4}{2}=90
$$

Next, the number of such 6-digit numbers formed by 0 and two given digits $i$ and $j$, where $1 \leq i<j \leq 9$, is
$$
\binom{5}{2} \cdot\binom{4}{2}=60
$$

Therefore the total number of such 6 -digit numbers formed by three distinct digits is
$$
\binom{9}{3} \times 90+\binom{9}{2} \times 60=9720 .
$$

Hence the answer is $9+2025+9720=11754$.