Powers counting#12210

Powers counting

1 second
256 megabytes
Medium

Given an integer , count how many quadruples (a,b,c,d) such that a^b \le c^d and (1 \le a,b,c,d \le n)

Input

The first line contains single integer (1 \le t \le 10^4) – the number of test cases.

The only line of each test contains single integer (1 \le n \le 1000) – the integer .

It's guaranteed that sum of overall test cases doesn't exceed .

Output

For each test, output a single integer – the count of quadruples (a,b,c,d) that satisfy the condition.

Examples

Example 1

Loading
Loading

Scoring

  1. Subtask ( points) : (1 \le n \le 3)

  2. Subtask ( points) : (1 \le \sum n \le 20)

  3. Subtask ( points) : (1 \le \sum n \le 100)

  4. Subtask ( points) : (1 \le \sum n \le 500)

  5. Subtask ( points): No additional constraints.