
数学题
文章平均质量分 63
SDAU_20175962
这个作者很懒,什么都没留下…
展开
-
【洛谷P3383】筛法求素数(埃氏筛法+线性筛法+6倍数判别法)
给定一个范围N,你需要处理M个某数字是否为质数的询问(每个数字均在范围1-N内) 输入输出格式 输入格式: 第一行包含两个正整数N、M,分别表示查询的范围和查询的个数。 接下来M行每行包含一个不小于1且不大于N的整数,即询问该数是否为质数。 输出格式: 输出包含M行,每行为Yes或No,即依次为每一个询问的结果。 输入输出样例 输入样例#1: 复制 100 5 2 3 4 ...原创 2018-08-06 11:34:42 · 1072 阅读 · 0 评论 -
【欧拉函数模板题】【前缀和】Farey Sequence
Problem DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. T...原创 2018-08-10 16:32:05 · 284 阅读 · 0 评论 -
【分解因子】The Little Elephant loves numbers.
The Little Elephant loves numbers.He has a positive integer x. The Little Elephant wants to find the number of positive integers d, such that d is the divisor of x, and x and d have at least one comm...原创 2018-04-21 16:13:20 · 332 阅读 · 0 评论