Problem
Given an arraynums of distinct positive integers, return the number of tuples (a, b, c, d) such that a * b = c * d where a, b, c, and d are elements of nums, and a != b != c != d.
Examples
Constraints
- 1 <= nums.length <= 1000
- 1 <= nums[i] <= 10^4
- All elements in nums are distinct.