hdu-5750 Dertouzos(数论)】的更多相关文章

Dertouzos Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1861    Accepted Submission(s): 584 Problem Description A positive proper divisor is a positive divisor of a number n, excluding n its…
Dertouzos 题意: 有中文,不说. 题解: 我看了别人的题解,还有个地方没懂, 为什么是 if(d%prime[i]==0) break; ? 代码: #include <bits/stdc++.h> using namespace std; const int INF=0x3f3f3f3f; typedef long long ll; #define PU puts(""); #define PI(A) printf("%d\n",A) #de…
Dertouzos Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 577    Accepted Submission(s): 160 Problem Description A positive proper divisor is a positive divisor of a number n, excluding n itse…
感悟:这又是zimpha巨出的一场题,然后04成功fst(也就是这题) 实际上还是too young,要努力增加姿势, 分析:直接枚举这些数不好枚举,换一个角度,枚举x*d,也就是d的另一个乘数是多少 显然  x<=min(d,(n-1)/d),x还得是质数,最后发现x必须小于d的最小因子 然后预处理10w以内的素数,然后每次先得到k=min(d,(n-1)/d),然后看d最小因子是否小于k 这题的关键就在找d的最小因子,我是暴力找的(然后碰上全是大素数就t了) 实际上当d是大素数的时候,k很小…
Problem Description A positive proper divisor is a positive divisor of a number n, excluding n itself. For example, 1, 2, and 3 are positive proper divisors of 6, but 6 itself is not.Peter has two positive integers n and d. He would like to know the…
Dertouzos Time Limit: 7000/3500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 891    Accepted Submission(s): 274 Problem Description A positive proper divisor is a positive divisor of a number n, excluding n itse…
题目给定n和d,都是10的9次方以内,求1到n里面有几个数最大因数是d?1000000组数据.解:求出d的满足p[i]*d<n的最小质因数是第几个质数.即为答案. #include<cstdio> #define N 100002 int t,n,d,pr[N],p[N],num; int main(){ for(int i=2;i<N;i++)if(!pr[i]){ for(int j=i+i;j<N;j+=i) pr[j]=1; p[++num]=i; } scanf(&…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6390 直接开始证明: 我们设…………………………………….....…...............……………...(1) 则…................................….…(2) 为什么是这样呢,因为我们知道 同理得到b的分解和的分解 我们会发现,虽然a和b的分解里可以有相等的部分,但是在里的也就是我们假设为的部分是不会有重复的,那么要由*得出也就是要去除重复部分,的重复部分就是…
给一个数n问有多少种x,y的组合使$\frac{1}{x}+\frac{1}{y}=\frac{1}{n},x<=y$满足,设y = k + n,代入得到$x = \frac{n^2}{k} + n$,也就是求n^2的因子数量 /** @Date : 2017-09-08 10:45:12 * @FileName: HDU 1299 数论 分解.cpp * @Platform: Windows * @Author : Lweleth (SoungEarlf@gmail.com) * @Link…
RGCDQ Time Limit: 3000MS   Memory Limit: 65536KB   64bit IO Format: %I64d & %I64u Submit Status Description Mr. Hdu is interested in Greatest Common Divisor (GCD). He wants to find more and more interesting things about GCD. Today He comes up with Ra…