8. $\sum_{0 \leqslant i<j \leqslant 50} \mathrm{C}_{50}^{i} \mathrm{C}_{50}^{j}$ modulo 31 is
8. 16 .

Notice,
$$
\begin{array}{l}
\sum_{0 \leqslant i<j \leqslant 50} \mathrm{C}_{50}^{i} \mathrm{C}_{50}^{j}=\frac{1}{2} \sum_{0 \leqslant i \neq j \leqslant 50} \mathrm{C}_{50}^{i} \mathrm{C}_{50}^{j} \\
=\frac{1}{2}\left[\sum_{i=0}^{50} \sum_{j=0}^{50} \mathrm{C}_{50}^{i} \mathrm{C}_{50}^{j}-\sum_{j=0}^{50}\left(\mathrm{C}_{50}^{i}\right)^{2}\right] \\
=\frac{1}{2}\left[\left(\sum_{i=0}^{50} \mathrm{C}_{50}^{i}\right)\left(\sum_{j=0}^{50} \mathrm{C}_{50}^{j}\right)-\sum_{i=0}^{50}\left(\mathrm{C}_{50}^{i}\right)^{2}\right] \\
=\frac{1}{2}\left(2^{100}-\mathrm{C}_{100}^{50}\right)=2^{99}-\frac{1}{2} \mathrm{C}_{100}^{50} . \\
\text { Also, } 2^{99}=2^{4} \times\left(2^{5}\right)^{19} \equiv 16(\bmod 31), \text { and } \\
\frac{1}{2} \mathrm{C}_{100}^{50}=\frac{99 \times 98 \times \cdots \times 51}{49 \times 48 \times \cdots \times 2 \times 1}
\end{array}
$$

is a multiple of 31, hence the remainder when $\sum_{0 \leqslant i<j \leqslant 50} \mathrm{C}_{50}^{i} \mathrm{C}_{50}^{j}$ is divided by 31 is 16.