You are given a sequence A1,A2,…,An. Determine the count of integers z (z∈A) that satisfies the following property :
∏z−1i=1imodz=z−1
Note: Your program must solve T independent test cases.
Input format
Output format
For each test case, print a number that indicates the count of integers in the sequence that satisfies the property. The output must be printed in a single line.
Constraints
1≤T≤10
1≤n≤105
2≤Ai≤108
Note: To know more about the ∏ notation, read Capital_pi_notation.
Here the integers 3 and 7 satisfy the property :
∏2i=1imod3=2mod3=2
∏6i=1imod7=6
So count is 2.