B: Twice of oneself
Problem
You are given Q queries. For each query, you are given a positive integer N, and you need to find the number of positive integers M that satisfy the following two conditions:
2 \leq M \leq N
The sum of the proper divisors of M (i.e. the divisors of M other than M itself) is at least twice as large as M.
Input Format
The input is given in the following format:
Q
N_1
N_2
:
N_Q
The first line contains the number of queries, Q.
The following N lines contain one positive integer N per query.
Constraints
1 \leq Q \leq 10^5
2 \leq N_i \leq 10^5 (1 \leq i \leq Q)
Output Format
For each given N, output the number of positive integers M that satisfy the above two conditions, separated by a newline.
Sample Input
3
43
9
24
Sample Output
11
0
5
For N=24, the five possible values of M are 12, 16, 18, 20, and 24.
