22. Let $[x]$ denote the greatest integer not exceeding the real number $x$. Then there are ( ) positive integers $n$ not exceeding 1000 such that: $\left[\frac{998}{n}\right]+\left[\frac{999}{n}\right]+\left[\frac{1000}{n}\right]$ is not divisible by 3.
(A) 22
(B) 23
(C) 24
(D) 25
(E) 26
22. A.

When $n=1$,
$$
\left[\frac{998}{n}\right]+\left[\frac{999}{n}\right]+\left[\frac{1000}{n}\right]=3 \times 999 \text {, }
$$

which does not meet the requirement.
When $n \geqslant 2$,
If $n \mid 998$, then
$$
\left[\frac{998}{n}\right]=\left[\frac{999}{n}\right]=\left[\frac{1000}{n}\right]=\frac{998}{n} \text {, }
$$

hence $\left[\frac{998}{n}\right]+\left[\frac{999}{n}\right]+\left[\frac{1000}{n}\right]=3 \times \frac{998}{n}$, which does not meet the requirement;
If $n \mid 999$, then
$$
\begin{array}{l}
{\left[\frac{999}{n}\right]=\left[\frac{1000}{n}\right]=\frac{999}{n},} \\
{\left[\frac{998}{n}\right]=\left[\frac{999}{n}\right]-1,} \\
\text { hence }\left[\frac{998}{n}\right]+\left[\frac{999}{n}\right]+\left[\frac{1000}{n}\right]=3 \times \frac{999}{n}-1
\end{array}
$$

which is not divisible by 3;
If $n \mid 1000$, then
$$
\begin{array}{l}
{\left[\frac{998}{n}\right]=\left[\frac{999}{n}\right]=\left[\frac{1000}{n}\right]-1,} \\
{\left[\frac{1000}{n}\right]=\frac{1000}{n},} \\
\text { hence }\left[\frac{998}{n}\right]+\left[\frac{999}{n}\right]+\left[\frac{1000}{n}\right]=3 \times \frac{1000}{n}-2
\end{array}
$$

which is not divisible by 3.
Therefore, we only need to find the number of divisors $n (2 \leqslant n \leqslant 1000)$ of 999 and 1000.
Note that, $999=3^{3} \times 37$.
By the divisor count theorem, the number of divisors is
$$
(3+1)(1+1)=8 \text {. }
$$

Since $n \geqslant 2$, the number of $n$ is $8-1=7$.
Similarly, $1000=2^{3} \times 5^{3}$.
Thus, the number of $n$ is $(3+1)(3+1)-1=15$.
Since $(999,1000)=1$, the number of $n$ is $7+15=22$.