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

Guess

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 1498    Accepted Submission(s): 383


Problem Description
Recently, Stump felt $\sum_{k=1}^n \mu^2(k)=\sum_{k=1}^n \mu(k)\lfloor\frac{n}{k^2}\rfloor$ with his heart immediately, which shocked Yoshinow2001 for a whole year!!

The above $\mu$ is $\textbf{Möbius function}$ $\mu(n)$: If $n$ contain square factor (i.e. there are positive integers $a > 1$ makes $a^2|n$ ) then the $\mu (n) = 0$. Otherwise, might as well set decomposition of prime factors of $n$ type $n=p_1\cdot p_2 \dots \cdot p_k$, then $\mu (n) = (-1)^k$. For example, $\mu(1)=1,\mu(2)=\mu(3)=-1$.

Recall that $\ln(n)$ denotes the logarithm of $n$ with base $e=\sum_{n=0}^{\infty}\frac{1}{n!}\approx 2.71828$.

Now Yoshinow2001 is furious and pulls out a question! Let

$$\begin{aligned}S(n)=\sum_{d|n}\mu(\frac{n}{d})\ln(d)\end{aligned}$$

You need to calculate:

$$e^{S(n)}\bmod 998244353$$

Stump was horrified when he saw the formula! Now he asks you to feel it with your heart for him!
 

Input
The first line of input is a positive integer $T(1\leq T\leq 2000)$ representing the number of data cases.

The next line has a total of $T$ integers, each of which corresponds to $n$ as described in the problem, where $1\leq n\leq 10^{18}$.
 

Output
For each testcase, output an integer representing the answer $\bmod \ 998244353$, separated by a space.
 

Sample Input
3 1 2 3
 

Sample Output
1 2 3
 

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-11-22 12:15:39, Gzip enabled