3. 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
Solve:
$24\left|a^{3}+23 \Rightarrow 24\right| a^{3}-1=(a-1)\left(a^{2}+a+1\right)$, note that $a^{2}+a+1$ is odd, so $8 \mid a-1 \Rightarrow a=8 k+1$. At this point, $a^{2}+a+1=(8 k+1)(8 k+2)+1=64 k^{2}+24 k+3$, if $3\left|a^{2}+a+1 \Rightarrow 3\right| 64 k^{2} \Rightarrow 3 \mid k \Rightarrow k=3 m$; if $3|a-1 \Rightarrow 3| 8 k \Rightarrow 3 \mid k \Rightarrow k=3 m$. Therefore, $a=24 m+1$. Given $a<100 \Rightarrow m=0,1,2,3,4$ for a total of 5 values. So the answer is $B$.