F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Tetrahedron

Time Limit: 9000/4500 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 1249    Accepted Submission(s): 528


Problem 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
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 \times 10^6$ and $n$ is no larger than $6 \times 10^6$.
 

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

Sample Input
3 1 2 3
 

Sample Output
3 124780546 194103070
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-27 06:25:30, Gzip enabled