| Codeforces Round 1137 (Div. 2) |
|---|
| Contest is running |
| 00:38:01 |
| Score | |
|---|---|
| Problem A | 338 |
| Problem B | 507 |
| Problem C | 845 |
| Problem D | 1352 |
| Problem E | 1352 |
| Problem F | 1690 |
| Successful hack | 100 |
| Unsuccessful hack | -50 |
| Unsuccessful submission | -50 |
| Resubmission | -50 |
Given an integer $$$n$$$. Find the number of ordered triples of integers $$$(x, y, z)$$$ such that $$$1 \leq x, y, z \leq n$$$, and the product $$$x \cdot y \cdot z$$$ is a perfect square$$$^{\text{∗}}$$$.
$$$^{\text{∗}}$$$An integer is a perfect square if it is equal to the square of some integer.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). The description of the test cases follows.
The only line of each test case contains one integer $$$n$$$ ($$$1 \leq n \leq 10^6$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, output one integer — the number of suitable triples of integers.
51234999990
14720141799145052
In the first test case, the only suitable triple is $$$(1, 1, 1)$$$.
In the second test case, the following triples are suitable: $$$(1, 1, 1)$$$, $$$(2, 2, 1)$$$, $$$(2, 1, 2)$$$, $$$(1, 2, 2)$$$.
| Name |
|---|


