3. Let $K$ be the set of all positive integers whose decimal representation does not contain the digit 7. Find all polynomials $f(x)$ such that the coefficients of $f(x)$ are non-negative integers, and for any $x \in K$, we have $f(x) \in K$.
3. If the coefficients of a polynomial $f$ are all non-negative integers, and $f(K) \subseteq K$, then $f$ is called stable.
The original problem is to find all stable polynomials.
First, prove three lemmas.
Lemma 1 If the polynomial
$$
f(x)=a_{0}+a_{1} x+a_{2} x^{2}+\cdots
$$

is stable, then the monomials $a_{0}, a_{1} x, a_{2} x^{2}, \cdots$ are also stable.

Proof of Lemma 1 For any $x \in K$, then for sufficiently large integer $m, f\left(10^{m} x\right)$'s decimal representation is precisely obtained by inserting several 0s between the decimal representations of $a_{0}, a_{1} x, a_{2} x^{2}, \cdots$.
Hence, by $f\left(10^{m} x\right) \in K$, we know
$a_{0}, a_{1} x, a_{2} x^{2}, \cdots \in K$.
Lemma 2 If $f(x)=c x$ is stable, then
$$
c=10^{m}(m \in \mathbf{N}) \text {. }
$$

Proof of Lemma 2 If the conclusion is not true, then there exists a non-negative integer $m$, such that
$$
10^{m} < c < 10^{m+1}.
$$
If $c \neq 10^{m}$, then $f(x) = c x$ is not stable.

Lemma 3 If $f(x)=c x^{d}$ is stable, then
$$
c=10^{m}(m \in \mathbf{N}), \quad d=1.
$$

Proof of Lemma 3 If $f(x)$ is stable, then clearly $f(10 x+3)$ is also stable.
And $f(10 x+3)$
$$
=c\left(3^{d}+10 d \times 3^{d-1} x+10^{2} C_{d}^{2} \times 3^{d-2} x^{2}+\cdots\right),
$$

Hence, by Lemma 1, we know $10 c d \times 3^{d-1} x$ is stable, but when $d>1$, $10 c d \times 3^{d-1}$ cannot be an integer power of 10, which contradicts the conclusion of Lemma 2.
Lemmas $1 \sim 3$ are proved.
In summary, the stable polynomials can only be:
$$
\begin{array}{l}
f(x)=k(k \in K), \\
f(x)=10^{m} x(m \in \mathbf{N}), \\
f(x)=10^{m} x+k(m \in \mathbf{N}, k \in K) .
\end{array}
$$

It is easy to verify that the first two types of polynomials are definitely stable. And for $f(x)=10^{m} x+k$, when $k \in K$ and $k<10^{m}$, it is also stable, but when $k \geqslant 10^{m}$, it is not stable. If the number of digits of $k$ is $m+l(l \geqslant 1)$, then there must exist some digit $a \in\{1,2, \cdots, 6,8,9\}$, such that $f\left(a \cdot 10^{l-1}\right)$'s rightmost $m+l$-th digit is 7.
Therefore, the set of all polynomials that satisfy the requirements is:
$$
\begin{array}{l}
f(x)=k(k \in K), \\
f(x)=10^{m} x(m \in \mathbf{N}), \\
f(x)=10^{m} x+k\left(m \in \mathbf{N}, k \in K, k<10^{m}\right) .
\end{array}
$$