Problem Description

For each testcase you get n, m and n integers. Count how many numbers give remainder 0..m-1 when divided by m. Output counts in one line.

Input Format

First integer t. For each: n m then n integers.

Output Format

t lines of m counts.

Sample Test Case

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

Constraints

Sum of n over all testcases

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next