Power of Twos

4.4

7 votes
Problem

Little Jhool is friend with the magical creature from Koi Mil Gaya as we all know, called Jaadu.

Now, Jhool 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, 21,22,23....21000000. 10,00,000 being the limit known to the people on Jaadu's planet. Also, Jhool is smart so he notices that this particular sequence starts from index 1 and NOT 0. Now since Jhool thinks that he's understood the sequence well, already so he challenges Jaadu.

Jaadu gives him a number, denoted by N, and asks Jhool to find the number of pairs (i,j) such that (JP[i]1) divides (JP[j]1) and 1i<jN. Jhool 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 1i<jN and JP[i]1 is divisors of JP[j]1.

Constraints:
1T10000
1N1000000

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?