Subarrays Sum Divisible

Python Hard 3 views
Back to Questions

Problem Description

Read n integers and k. Count subarrays whose sum is divisible by k.

Input Format

First line n k. Second line 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