text: Contribution to the answer would be the multiplication of the possible values for the first and the third element
code: answer += ( first + 1 ) * ( len ( indices [ z ] ) - third ) NEW_LINE return answer NEW_LINE