题目大意: 给出T个实例,T<=200,给出[a,b]区间,问这个区间里面有多少个素数?(1 ≤ a ≤ b < 231, b - a ≤ 100000) 解题思路: 由于a,b的取值范围比较大,无法把这个区间内的所以素数全部筛选出来,但是b-a这个区间比较小,所以可以用区间素数筛选的办法解决这个题目. 代码: #include<cstdio> #include<cstring> #include<iostream> #include<algorith…
题目链接:https://vjudge.net/problem/LightOJ-1197 1197 - Help Hanzo PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he…
E - Help Hanzo Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice LightOJ 1197 Description Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he ha…
题目链接 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 followin…