【Example 4】Among the positive integers not exceeding $10^{6}$, how many numbers are divisible by at least one of 3, 5, 7?
Let the set of all integers satisfying the given conditions be denoted as $B$, and the subsets of integers divisible by $3, 5,$ and $7$ be denoted as $B_{3}, B_{5},$ and $B_{7}$, respectively. Then we have $B=B_{3} \cup B_{5} \cup B_{7}$. If $[x]$ represents the greatest integer not exceeding the real number $x$, we have
$$
\begin{array}{l}
\left|B_{3}\right|=\left[10^{6} / 3\right]=333333 \\
\left|B_{5}\right|=\left[10^{6} / 5\right]=200000 \\
\left|B_{7}\right|=\left[10^{6} / 7\right]=142857 \\
\left|B_{3} \cap B_{5}\right|=\left[10^{6} / 15\right]=66666 \\
\left|B_{3} \cap B_{7}\right|=\left[10^{6} / 21\right]=47619 \\
\left|B_{5} \cap B_{7}\right|=\left[10^{6} / 35\right]=28571 \\
\left|B_{3} \cap B_{5} \cap B_{7}\right|=\left[10^{6} / 105\right]=9523
\end{array}
$$

Thus, by the principle of inclusion-exclusion, the number of integers satisfying the conditions is
$$
\begin{aligned}
|B|= & \left|B_{3} \cup B_{5} \cup B_{7}\right| \\
= & \left|B_{3}\right|+\left|B_{5}\right|+\left|B_{7}\right|-\left|B_{3} \cap B_{5}\right| \\
& -\left|B_{3} \cap B_{7}\right|-\left|B_{5} \cap B_{7}\right|+\left|B_{3} \cap B_{5} \cap B_{7}\right| \\
= & 542857 \text { (numbers) }
\end{aligned}
$$

Next, let's look at a few examples of restricted permutations using the principle of inclusion-exclusion.