title: Find sum of subset with multiplication
body: <p>Let's say we have got a set </p>
  
  <pre><code>{a_1, a_2, a_3, ..., a_n}
  </code></pre>
  
  <p>The goal is to find a sum that we create in the following way: We find all subsets whose length is 3, then multiply each subset's elements (for the subset <code>{b_1, b_2, b_3}</code> the result will be <code>b_1*b_2*b_3</code>). At the end we sum up all these products.</p>
  
  <p>I am looking for a shortest time-execution algorithm.</p>
  
  <p>Example</p>
  
  <pre><code>SET: {3, 2, 1, 2}
  
  Let S be our sum.
  
  S = 3*2*1 + 3*2*2 + 2*1*2 + 3*1*2 = 28
  </code></pre>