Bội chung tập con


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 1G

Problem type

Cho dãy $a_1,a_2,...,a_N$. Đếm số tập con của dãy có bội chung nhỏ nhất là $M$.

Dữ liệu

  • Dòng đầu tiên chứa hai số nguyên $N, M \ (1 \le N \le 2\times10^5; 1\le M \le 10^{16})$;
  • Dòng tiếp theo chứa $N$ số nguyên $a_i \ (1\le a_i \le 10^{16})$.

Kết quả

  • Kết quả bài toán sau khi chia lấy dư cho $10^9+7$.

Ví dụ

Ví dụ 1

input

4 6
2 3 4 6

output

5
Ví dụ 2

input

5 512
1 1 512 1 1

output

16

Comments

There are no comments at the moment.