Artifact 451164162aaf47508c1c13db23603eb8470fda8b
- File
_lib/numeric/erathos.cpp
- 2011-02-23 09:21:16 - part of checkin [4fd800b3a8] on branch trunk - Copied from private svn repository. (user: kinaba) [annotate]
- File
lib/numeric/erathos.cpp
- 2011-02-23 11:18:09 - part of checkin [23dfcca431] on branch trunk - renamed _lib to lib (user: kinaba) [annotate]
static const int N = 999999; vector<bool> isp(N+1, true); vector<int> ps; for(int p=2; p<=N; ++p) if( isp[p] ) { ps.push_back(p); for(int q=p+p; q<=N; q+=p) isp[q] = false; }