2964. Number of Divisible Triplet Sums
Given a 0-indexed integer array
nums
and an integerd
, return the number of triplets(i, j, k)
such thati < j < k
and(nums[i] + nums[j] + nums[k]) % d == 0
.
c++
1 | class Solution { |