How to stack two lines of subscripts? [duplicate]

How do I type two lines of subscript as shown below?

• Welcome to TeX.SE! With substack, for example $\sum_{\substack{1\le\le n\\ 1<j<k}}$ Dec 12 '20 at 1:08

With use of the substack.

With using the amsmath package, you can simply define math operator for dist (it should be in upright letters):

\documentclass[varwidth, margin=3mm]{standalone}
\usepackage{amsmath}

\DeclareMathOperator{\dist}{dist}

\begin{document}
$C=\sum_{\substack{1\leq i\leq n\\ 1 <j <k}}\dist(d_i,c_j)$
or

$C=\sum\nolimits_{\substack{1\leq i\leq n\\ 1 <j <k}}\dist(d_i,c_j)$
\end{document}