Subarrays Divisible by K

JavaScript Medium 5 views
Back to Questions

Problem Description

Count subarrays whose sum is divisible by k.

Input Format

Line1: n k. Line2: n integers.

Output Format

One integer count.

Sample Test Case

Input:
6 5 4 5 0 -2 -3 1
Output:
7

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next