give array num distinct positive integer return number tuple b c d b c d b c d element num b c d Example 1input num 2346output 8explanation there 8 valid tuples2634 2643 6234 62433426 4326 3462 4362example 2input num 124510output 16explanation there 16 valid tuples11025 11052 10125 1015225110 25101 52110 5210121045 21054 10245 1025445210 45102 54210 54102 Constraints1 numslength 10001 numsi 104All element num distinct