题目大意:给定n,m,求有多少组(a,b) 0g(p'x)=mu[x]2.x%p'!=0 , 那么对于先前所有的 x/p 来说,此时乘了p' , 若p!=p' , 那么因为多了一个因子 mu[p'*x/p] = -mu[x/p] , 所以在p!=p'时,所有的情况相加为-g(x),在考虑枚举到的p'...
分类:
其他好文 时间:
2015-04-14 23:13:17
阅读次数:
231
14256. Pseudo Semiprime
Constraints
Time Limit: 1 secs, Memory Limit: 256 MB
Description
In number theory, a positive integer is a semiprime if it is the product of two primes. For example, 35 i...
分类:
其他好文 时间:
2015-04-08 09:13:44
阅读次数:
108
#include
#include
#include
#include
using namespace std;
#define MAX 1000010
#define MAXP 700000
int vis[MAX];
int prime[MAXP];
int n;
double dp[MAX];
bool flag[MAX];
int primes_num;
void sieve...
分类:
其他好文 时间:
2015-03-21 20:05:32
阅读次数:
134
#include
using namespace std;
const int maxn = 10000 + 5;
int e[maxn],vis[maxn];
vector primes;
void add_primes() {
memset(vis,0,sizeof(vis));
int m = sqrt(10000+0.5);
for(int i=2;i<=m;i++...
分类:
其他好文 时间:
2015-03-19 18:30:44
阅读次数:
164
Problem Description
Write a program to read in a list of integers and determine whether or not each number is prime. A number, n, is prime if its only divisors are 1 and n. For this problem, the numbers 1 and 2 are not considered primes.
Input
Each inp...
分类:
其他好文 时间:
2015-03-13 14:24:56
阅读次数:
130
bool is_prime (const vector& primes, int num){ for (const auto& prime : primes) { if (num % prime == 0) { return false; } ...
分类:
其他好文 时间:
2015-03-10 13:26:31
阅读次数:
103
#include#include#includeusing namespace std;int D[111]; //存放拆解的数字int DI=0; //D的数组下标bool isPrime(int n){ if(n<=1) return 0; int ...
分类:
其他好文 时间:
2015-03-06 12:23:02
阅读次数:
130
DescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in ...
分类:
其他好文 时间:
2015-03-04 14:19:10
阅读次数:
135
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:
其他好文 时间:
2015-02-28 21:46:29
阅读次数:
187
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:
其他好文 时间:
2015-02-25 21:10:58
阅读次数:
151