10200 - Prime Time 此题极坑(本菜太弱),鉴定完毕,9遍过. 题意:很简单的求一个区间[a,b]内满足i*i+i+41(i>=a&&i<=b,0<=a<=b<=10000.)是素数的数有多个,求出百分比. 思路:直接裸判就行了(竟然不超时),但结果要加上1e-8(are you kidding me?). 下面来说说我怎么跪了,开始也是直接裸判,我…
这道题要找二元组(x, y) 满足1 <= x, y <= n 且x与y互素 那么我就可以假设x < y, 设这时答案为f(n) 那么答案就为2 * f(n) +1(x与y反过来就乘2,加上(1,1)) 那么f(n)可以用欧拉函数求 显然f(n) = phi(2) + phi(3) + --+phi(n) #include<cstdio> #define REP(i, a, b) for(int i = (a); i < (b); i++) using namespac…
E - (例题)欧拉函数求和 Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description A lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0…
D - (例题)欧拉函数性质 Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Description Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popul…