5575: A
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:1
解决:1
题目描述
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