timu
jiazihan1208 · · 题解
AT_abc466_f [ABC466F] Many Mod Calculation
题目描述
You are given integers
For a non-negative integer
Find the number of integers
You are given
输入格式
The input is given from Standard Input in the following format:
T $ $ \text{case}_1 $ $ \text{case}_2 $ $ \vdots $ $ \text{case}_T
Each test case is given in the following format:
N $ $ X $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N
输出格式
Output the answers for the test cases in order, separated by newlines.
输入输出样例 #1
输入 #1
4
3 7
5 2 3
9 31415
9 9 8 2 4 4 3 5 3
1 1000000000000000000
1
9 20260405
3141 5926 5358 9793 2384 6264 3383 2795 288
输出 #1
4
17452
1000000000000000000
77403
说明/提示
Sample Explanation 1
Consider the first test case.
For example, when
There are four integers
Constraints
-
1\le T\le 2\times 10^5 -
1\le N\le 2\times 10^5 - The sum of
N over all test cases is at most2\times 10^5 . -
1\le X\le 10^{18} -
1\le A_i\le 10^{18} - All input values are integers.