Counting Divisors

TimeLimit:5000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
In mathematics, the function $d(n)$ denotes the number of divisors of positive integer $n$.

For example, $d(12)=6$ because $1,2,3,4,6,12$ are all $12$'s divisors.

In this problem, given $l,r$ and $k$, your task is to calculate the following thing :

\begin{eqnarray*}
\left(\sum_{i=l}^r d(i^k)\right)\bmod 998244353
\end{eqnarray*}
Input
The first line of the input contains an integer $T(1\leq T\leq15)$, denoting the number of test cases.

In each test case, there are $3$ integers $l,r,k(1\leq l\leq r\leq 10^{12},r-l\leq 10^6,1\leq k\leq 10^7)$.
Output
For each test case, print a single line containing an integer, denoting the answer.
SampleInput
3
1 5 1
1 10 2
1 100 3
SampleOutput
10
48
2302
Submit
题目统计信息详细
总AC数2
通过人数2
尝试人数3
总提交量3
AC率66.67%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签
出处

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: