Type: Default 1000ms 256MiB

两数之模

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给定数组 nn 和正整数 kk,统计数组中有多少对不同的i,ji,j,使得aimodaj=ka_{i} \bmod a_{j} = k,输出答案对998244353998244353取模

mod\bmod 运算是两数相除的余数

Format

Input

第一行两个整数nkn,k

第二行 nn 个整数,表示给定数组

Output

一行一个整数

Samples

输入

3 1
1 2 3

输出

3

Limitation

1n105,0ai,k106 1 \le n \le 10^{5}, 0\le a_{i} , k \le 10^{6}

20241128周赛

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2024-11-28 16:30
End at
2024-11-28 18:30
Duration
2 hour(s)
Host
Partic.
25