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

Counting Divisors

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 6650    Accepted Submission(s): 2310


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.
 

Sample Input
3 1 5 1 1 10 2 1 100 3
 

Sample Output
10 48 2302
 

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-20 23:54:57, Gzip enabled