
基础数论
文章平均质量分 61
Scare-Crow
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
线性筛素数 洛谷P3383
题目背景本题已更新,从判断素数改为了查询第kk小的素数提示:如果你使用cin来读入,建议使用std::ios::sync_with_stdio(0)来加速。题目描述如题,给定一个范围nn,有qq个询问,每次输出第kk小的素数。输入格式第一行包含两个正整数n,qn,q,分别表示查询的范围和查询的个数。接下来qq行每行一个正整数kk,表示查询第kk小的素数。输出格式输出qq行,每行一个正整数表示答案。输入输出样例输入 #1复制...原创 2021-12-14 15:39:40 · 1178 阅读 · 0 评论 -
Primes
A pretty straight forward task, calculate the number of primes between 2 integers.Given 2 integersA \leq B < 5*10^6A≤B<5∗106what's the number of primes in range from A to B inclusive.Note: A prime number is a positive integer greater than 1 and..原创 2021-12-08 22:43:24 · 366 阅读 · 0 评论 -
Bash‘s Big Day
Bash has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Professor Zulu's Lab. Since Bash is Professor Zulu's favourite student, Zulu allows him to take as many Pokemon from his lab as he pleases.But Zulu原创 2021-12-08 22:41:18 · 193 阅读 · 0 评论 -
Factorial
The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and every phone connects to the BTS with the strongest signal (in a little原创 2021-12-08 22:37:57 · 142 阅读 · 0 评论 -
Little Dima and Equation
Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following problem as a punishment.Find all integer solutionsx(0 < x < 109)of the equation:x = b·s(x)a + c, wherea,b,care some predetermine...原创 2021-12-08 22:12:27 · 515 阅读 · 0 评论 -
owet and the power I
you have three numbers a,b and p. you should calculate the value ofa^b\% pab%p.Inputone line contains three numbers a,b and p(a,b,p \leq 10^9a,b,p≤109)Outputone line contains a numbera^b \% pab%pExampleInput2 3 5Output3NoteFor e..原创 2021-12-08 22:08:33 · 347 阅读 · 0 评论 -
Chilly Willy
Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are2,3,5and7. But Willy grew rather bored of such numbers, so he came up with a few games that were connected with them.Chilly Willy wants to fin...原创 2021-12-08 22:04:44 · 339 阅读 · 0 评论 -
Calendar Reform CF172D
Reforms have started in Berland again! At this time, the Parliament is discussing the reform of the calendar. To make the lives of citizens of Berland more varied, it was decided to change the calendar. As more and more people are complaining that "the yea原创 2021-12-08 21:57:59 · 207 阅读 · 0 评论