Evaluating a triple summation ${\sum \sum \sum}_{1 \le i < j \le k \le 20} a_ia_ja_k$ 
If $$a_i= \begin{cases} 1 && 1 \le i \le 10 \\ 2 && 11 \le i \le 20 \end{cases}  $$
Find the value of $$\displaystyle {\sum \sum \sum}_{1 \le i < j \le k \le 20} a_ia_ja_k $$

I could only evaluate the summation when $1 \le i < j \le k \le 10$, by writing it as $\displaystyle {\sum _{i=1}^9\sum_{j=i+1}^{10} \sum_{k=j}^{10}} 1$ which came out to be $\displaystyle \binom{11}{3}$.
Should I make different cases like $i \le 10, 11 \le j \le k \le 20$ , etc.?
How do I evaluate it for the other cases? Is there any easier way to evaluate it without evaluating each sum one by one? Could there possibly be a combinatorial approach? I'd be delighted to see different approaches to this problem.

Let

*

*$ A = \sum_{i < j < k } a_ia_ja_k$

*$ B = \sum_{i = j < k } a_ia_ja_k$

*$ C = \sum_{i < j = k } a_ia_ja_k$

*$ D = \sum_{i = j = k } a_ia_ja_k$
We're after $ A  + C$.
Clearly,

*

*$ 30^3 = ( \sum a_i)^3  = D + 3C + 3B + 6A$.

*$ D = 10 ( 1^3 + 2^3 ) = 90$

*$C = 2^2 ( 10 \times 10\times 1 + \frac{10 \times 9 }{ 2} \times 2 ) + 1^2 (\frac{10 \times 9 } { 2} \times 1) = 805$

*$ B = 1^2 (10\times 10 \times 2 + \frac{10 \times 9} { 2} \times 1) + 2^2 (\frac{10 \times 9 }{ 2} \times 2)  = 605$

*So, $A = \frac{30^3 - 90 - 3 \times 805 - 3 \times 605 }{ 6} = 3780$.

Hence, $ A + C = 4585$.
