James Bond and Divisors
Submissions: 636   Accuracy:

23.06%

  Difficulty: Medium   Marks: 4

James Bond just watched the video cassette named "MISS ME?" In which Mary asks him to save Tanuj. But, Tanuj is not responding his phone calls so James Bond decides to plan a new drama and for this he needs to find out what Tanuj will do exactly after 2 weeks. Which is totally random, but according to James Bond there is always some rhythm while taking a decision and as Tanuj is his best friend he knew everything about him.
By judging all his previous decisions he comes to know that Tanuj loves to convert a number i to Xi. Where Xi is the number of divisors of i.  So on this criteria, James Bond decides to find out his next decision and as it can be so random James Bond needs to test this for number of times, let suppose for T times. But James Bond don't have much time so he asks for your help.

 

Input:
The first line of input contains T denoting number of test cases. Then T test cases follow. The frst line of each test case contains a number N. Your task is to find out Y = sum(Xi), where i are the integers from 1 to N.


Output:
For each test case in a new line print the value of  Y.

 

Constraints:
1<= T <= 10^5
1<= N <= 10^5


Example:
Input:
2
2
4

Output:
3
8

 

Explanation:

Test case 1:
N=2
X1 = 1 (ie 1)
X2 = 2 (ie 1,2)
so Y = 1 + 2 = 3

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Tanuj Yadav
Author: tanujyadav97


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.