#P6060. Viral Spread Factorization
Viral Spread Factorization
Viral Spread Factorization
After the outbreak of pneumonia in City W, scientists immediately embarked on an intensive research effort. In this problem, you are given two positive integers \(n\) and \(k\). For every day \(i\) from \(1\) to \(n\), define the virus's spreading capability on day \(i\) as \(D(i^k)\). Here, \(D(x)\) denotes the number of positive divisors of \(x\). For example, \(D(6)=4\) and \(D(7)=2\).
Your task is to compute the sum
[ S = \sum_{i=1}^{n} D(i^k) = D(1^k) + D(2^k) + \cdots + D(n^k) ]
Since the answer could be very large, output \(S\) modulo 998244353.
Note: The function \(D(x)\) is defined as the number of positive divisors of \(x\). If \(x\) has the prime factorization \(x = p_1^{a_1} p_2^{a_2} \cdots p_m^{a_m}\), then \(D(x) = (a_1 + 1)(a_2 + 1) \cdots (a_m + 1)\). Consequently, for \(i^k\), if \(i = p_1^{b_1} p_2^{b_2} \cdots p_m^{b_m}\), then \(i^k = p_1^{k b_1} p_2^{k b_2} \cdots p_m^{k b_m}\) and \(D(i^k) = (k b_1 + 1)(k b_2 + 1) \cdots (k b_m + 1)\).
inputFormat
The input consists of a single line containing two space-separated integers (n) and (k) where (1 \leq n, k).
outputFormat
Output a single integer: the value of (\sum_{i=1}^{n} D(i^k)) modulo (998244353).
sample
3 1
5