Given an integer
, find the number of tuples such that and is an integer.
For example, if , the tuple satisfies both conditions, i.e. is an integer, however does not since is not an integer.
Input Format
- The first line of input contains an integer , denoting the number of test cases. The description of test cases follows.
- Each test case consists of a single line of input containing one integer, .
Output Format
- For each test case, print a new line containing a single integer, the answer to that test case.
Constraints
- The sum of over all test cases does not exceed
Sample Input 1
3
2
3
7
Sample Output 1
10
31
355
Explanation
Test Case : There are tuples to consider, out of them the only ones that are invalid are those where one of the fractions is and the other is an integer. The valid tuples are
Test Cases and : There are too many tuples to list them in these cases. However, you may verify that among the and tuples respectively only and of them satisfy the conditions in the problem statement.
ConversionConversion EmoticonEmoticon