传统题 4500ms 128MiB

Tetrahedron

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Generate three integers a, b, 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.

Input Format

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×1062×10^6 and n is no larger than 6×1066×10​^6​.

Output Format

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

3
1
2
3​
3
124780546
194103070

2020HBCPC训练赛

未参加
状态
已结束
规则
ACM/ICPC
题目
8
开始于
2020-9-12 13:00
结束于
2020-9-12 17:00
持续时间
4 小时
主持人
参赛人数
15