Given an integer array nums and an integer d, count the number of index triplets (i, j, k) such that nums[i] + nums[j] + nums[k] is divisible by d.
Return the total number of such triplets.
Constraints:
nums.length
nums[i]
d
Given an integer array nums and an integer d, count the number of index triplets (i, j, k) such that nums[i] + nums[j] + nums[k] is divisible by d.
Return the total number of such triplets.
Constraints:
nums.length
nums[i]
d