Given a nums and an integer k, determine the total number of index pairs (i, j) satisfying i j nums.length such that nums[i] == nums[j] and (i j) is divisible by k.
Constraints:
nums.length
nums[i], k
Given a nums and an integer k, determine the total number of index pairs (i, j) satisfying i j nums.length such that nums[i] == nums[j] and (i j) is divisible by k.
Constraints:
nums.length
nums[i], k