8. Let the positive integer $n$ satisfy $n \leq 2016$, and $\left\{\frac{n}{2}\right\}+\left\{\frac{n}{4}\right\}+\left\{\frac{n}{6}\right\}+\left\{\frac{n}{12}\right\}=3$. The number of such $n$ is $\qquad$. Here $\{x\}=x-[x]$, where $[x]$ denotes the greatest integer not exceeding $x$.
Answer: 168.
Solution: For any integer $n$, we have
$$
\left\{\frac{n}{2}\right\}+\left\{\frac{n}{4}\right\}+\left\{\frac{n}{6}\right\}+\left\{\frac{n}{12}\right\} \leq \frac{1}{2}+\frac{3}{4}+\frac{5}{6}+\frac{11}{12}=3,
$$

The equality holds if and only if $n \equiv-1(\bmod 12)$. Combining with $1 \leq n \leq 2016$, we know that all the positive integers satisfying the condition are $n=12 k-1(k=1,2, \cdots, 168)$, totaling 168.