博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 6069 Counting Divisors 筛法
阅读量:4582 次
发布时间:2019-06-09

本文共 1184 字,大约阅读时间需要 3 分钟。

Counting Divisors

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)

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 :
(i=lrd(ik))mod998244353
 

 

Input
The first line of the input contains an integer 
T(1T15), denoting the number of test cases.
In each test case, there are 3 integers l,r,k(1lr1012,rl106,1k107).
 

 

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

官方题解:

  唯一分解定理

#pragma comment(linker, "/STACK:1024000000,1024000000")#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;#define LL long long#define pi (4*atan(1.0))#define bug(x) cout<<"bug"<
<

 

转载于:https://www.cnblogs.com/jhz033/p/7280824.html

你可能感兴趣的文章
一对一关系
查看>>
git命令的使用 【备用】
查看>>
uva1391 2-SAT 问题
查看>>
数据类型
查看>>
Java秒杀系统实战系列~整合Shiro实现用户登录认证
查看>>
js功能汇总
查看>>
C. Magic Ship cf 二分
查看>>
Android(java)学习笔记107:Relativelayout相对布局
查看>>
leetcode[90]Subsets II
查看>>
hlg1175小陈老师、桌子、盘子【计算几何】
查看>>
SSH服务器拒绝了密码,xshell连不上虚拟机怎么办
查看>>
Swoole RPC 的实现
查看>>
动态规划求两个序列的最长公共子序列
查看>>
课堂随笔
查看>>
阿里巴巴代码规范阅读记录
查看>>
冲刺2-4
查看>>
[bbk4774] 第30集 - 第三章 Flashback Table 07
查看>>
MD5 加密 以及 加盐加密
查看>>
十一:Centralized Cache Management in HDFS 集中缓存管理
查看>>
C#中使用MD5加密的方法
查看>>