I just observed how the loops are working. Once we could figure it out, the calculation takes $1$ min. Overall we can do it under $3$ mins
$\sum_{i=1}^{10}i+\sum_{i=1}^{9}i+\sum_{i=1}^{8}i+\sum_{i=1}^{7}i+\sum_{i=1}^{6}i+\sum_{i=1}^{5}i+\sum_{i=1}^{4}i+\sum_{i=1}^{3}i+\sum_{i=1}^{2}i+\sum_{i=1}^{1}i$
$=55+45+36+28+21+15+10+6+3+1=220$