Jaadu Power

All submissions for this problem are available.
Rohit is friend with the magical creature from Koi Mil Gaya as we all know, called Jaadu.
Now, Rohit is learning Mathematics from Jaadu; he wants to know about the Mathematics of the other planet, too. In Jaadu's planet, the sequence of powers of two are called the: The JP. (Jaadu power !) That is, 2^1, 2^2, 2^3.... 2^1000000.
10,00,000 being the limit known to the people on Jaadu's planet. Also, Rohit is smart so he notices that this particular sequence starts from index 1 and NOT 0. Now since Rohit thinks that he's understood the sequence well already, so he challenges Jaadu.
Jaadu gives him a number, denoted by N, and asks Rohit to find the number of pairs (i, j) such that (JP [i]  1) divides (JP[j]  1) and 1<=i.
Rohit is stunned by this difficult question. And needs your help !
Input
First line contains number of test cases T. Each test cases contains single integer N.
Output
For each test case print total numbers of pairs (i,j) such that 1<=i and JP[i]1 is divisors of JP[j]1.
Constraints
 1<=T<=10000
 1<=N<=1000000
Example
Input: 3 1 2 3 Output: 0 1 2
Author:  amarentheran 
Tags  amarentheran 
Date Added:  12042015 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.3.2, CPP 6.3, CPP14, CS2, D, ERL, FORT, FS, GO, HASK, ICK, ICON, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, NODEJS, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYPY, PYTH, PYTH 3.5, RUBY, SCALA, SCM chicken, SCM guile, SCM qobi, ST, TCL, TEXT, WSPC 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 