$24 . N$ is the smallest number among those which leave a remainder of 2 when divided by 5, a remainder of 3 when divided by 7, and a remainder of 4 when divided by 9. Then the sum of the digits of $N$ is ( ).
(A) 4
(B) 8
(C) 13
(D) 22
(E) 40
24.C.

Since $N$ leaves a remainder of 2 when divided by 5, we can set $N=5q+2$ ($q$ is an integer), then $2N+1=10q+5$. Therefore, 5 divides $2N+1$. Similarly, if $2N+1$ is divisible by 7 and 9, then $2N+1$ is divisible by $5 \times 7 \times 9 = 315$. Thus, $2N+1 \geqslant 315$, which means $N \geqslant 157$. Since 157 satisfies the conditions, therefore, $N=157$, and the sum of its digits is 13.