*5. Let $a$ be a positive integer, $a<100$, and $a^{3}+23$ is divisible by 24. Then, the number of such $a$ is ( ).
(A) 4
(B) 5
(C) 9
(D) 10
5. B Only consider $24 \mid\left(a^{3}-1\right)$, we have
$$
\begin{aligned}
a^{3}-1 & =(a-1)\left(a^{2}+a+1\right) \\
& =(a-1)[a(a+1)+1] .
\end{aligned}
$$

Since $a(a+1)+1$ is odd, for $24 \mid\left(a^{3}-1\right)$ to hold, it must be that $2^{3} \mid(a-1)$. If $a-1$ is not divisible by 3, then $3 \mid a(a+1)$, which means $a(a+1)+1$ cannot be divisible by 3. Therefore, for $24 \mid\left(a^{3}-1\right)$ to hold, it must be that $3 \mid(a-1)$. This implies $24 \mid(a-1)$, i.e., $a=24k+1,(k \in \mathbb{Z})$.

By $24k+1<100$, $k$ can take all values $0,1,2,3, 4$, which means such $a$ are $1,25,49,73,97$ five in total.