7481: Tetrahedron

内存限制:128 MB 时间限制:4 S
题面:传统 评测方式:文本比较 上传者:
提交:13 通过:12

题目描述

Generate three integers ab, and c in [1,n] with equal probability independently, and use them as the three right-angle side length of a right-angled tetrahedron. Find the expectation of the reciprocal square of the distance from the right-angle apex to the slope (Euclidean distance).

For each test case, output a line containing the answer mod 998244353.


输入格式

In the first line, you should read an integer T denoting the number of test cases.
In every test case, the only line will include an integer n.
It is guaranteed that T is no larger than 2×106 and n is no larger than 6×106.

输出格式

For each test case, output the only line containing just one integer denoting the answer mod 998244353.

输入样例 复制

3
1
2
3

输出样例 复制

3
124780546
194103070