5. Among the natural numbers from 1 to 300, choose three different numbers such that their sum is divisible by 3. There are ( ) ways to do this.
(A) $\mathrm{C}_{1 \infty}^{3}$
(B) $\mathrm{C}_{1 \infty}^{1} \cdot \mathrm{C}_{100}^{1} \cdot \mathrm{C}_{1 \infty}^{1}$
(C) $3 C_{1 \infty}^{3}$
(D) $3 C_{1 \infty}^{3}+\mathrm{C}_{10}^{1} \cdot \mathrm{C}_{1 \infty}^{1} \cdot \mathrm{C}_{1 \infty}^{1}$
5.D.

Classify the natural numbers from 1 to 300 by modulo 3. Taking one number from each class or taking three numbers from the same class can satisfy the condition.