Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The maximum value of nums.length is very large, but the maximum value of nums[i] is not.
Count the number of times each value appears in nums. Brute force through every possible combination of values and count how many single divisor triplets can be made with that combination of values.