Responsive image

问题 1822 --Counting Divisors

1822: Counting Divisors

时间限制: 10 Sec  内存限制: 128 MB
提交: 15  解决: 13
[提交][状态][讨论版][命题人:]

题目描述

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 :

(∑i=lrd(ik))mod998244353

输入描述

The first line of the input contains an integer T(1≤T≤15), denoting the number of test cases.

In each test case, there are 3 integers l,r,k(1≤l≤r≤1012,r−l≤106,1≤k≤107).

输出描述

For each test case, print a single line containing an integer, denoting the answer.

样例输入

3
1 5 1
1 10 2
1 100 3

样例输出

10
48
2302

来源

 

[提交][状态]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版