1522 数的选择


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

一天DD发现YCC和LCS两人正在玩游戏,游戏是这样的:YCC先写下了N个数字,然后让LCS在小于等于M的正整数中选择一个数,这个数不被N个数中的任何一个整除。-_-。

但是偶想知道LCS到底有多少种不同的选择(⊙o⊙)?

Input

不超过10组数据,处理到文件结束。 每组数据第一行两个数N和M(1<=N<=12,1<=M<=10^4),接下来一行包含N个整数,都小于M。

Output

输出LCS有多少种不同的选择。

Sample

Input

2 10
3 4
3 20
2 7 4

Output

5
9

Source: zjut_DD


Comments

There are no comments at the moment.