#20236. A

A

说明

Problem Description

Given n integers s1, s2… sn, your task is to calculate the number of integers in interval [1,m] which satisfied the following two conditions:

a. The chosen integer can not be divided by any of the given integer.

b. None of the given integer can be contained in the chosen integers as a part of the decimal representation. Such as the integer 420464 contains 204 as a part.


输入格式


The first line contains only one integer T, which is the number of test cases.
Each test case starts with two integers, n and m which are described above.

Then follow n integers describe the given n integers.



输出格式

For each test case, output the case number first, then output the number of integers in interval [1,m] which satisfied the two conditions.
2
1 10
7
2 100
12 3
Case 1: 9
Case 2: 55

提示

Range of the test data

T<=10

N<=10

Si<=10086

M<=10086

来源

去年校赛 洛谷