Easy

22.3%

Given a string consisting of digits 0-9, count the number of subsequences in it divisible by n.

**Input:**

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer M and N where M denotes the length of the numeric string.

The second line of each test case contains the numeric string.

**Output:**

Output the number of subsequences dicisible by N. Since the number can be quite large print the answer modulo 10^{9}+7.

**Constraints:**

1<= T <=100

1<= M <=1000

1<= N <=1000

**Example:**

**Input:**

2

4 4

1234

3 6

330

**Output:**

4

4