3729. Count Distinct Subarrays Divisible by K in Sorted Array
You are given an integer array
numssorted in non-descending order and a positive integerk.A subarray of
numsis good if the sum of its elements is divisible byk.Return an integer denoting the number of distinct good subarrays of
nums.Subarrays are distinct if their sequences of values are. For example, there are 3 distinct subarrays in
[1, 1, 1], namely[1],[1, 1], and[1, 1, 1].
1 | class Solution { |