1726. Tuple with Same Product
https://leetcode.com/problems/tuple-with-same-product
Description
Given an array nums
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
.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
1 <= nums.length <= 1000
1 <= nums[i] <= 104
All elements in
nums
are distinct.
ac
Previous1725. Number Of Rectangles That Can Form The Largest SquareNext1727. Largest Submatrix With Rearrangements
Last updated