素数打表
摘要:
void init_prim() { memset(visit, true, sizeof(visit)); int num = 0; for (int i = 2; i <= n; ++i) { if (visit[i] == true) { num++; prime[num] = i; } for (int j = 1; ((j <= num) && (i * prime[j] <= n)); ++j) {... 阅读全文
posted @ 2012-08-19 20:07 仁者无敌8勇者无惧 阅读(145) 评论(0) 推荐(0) 编辑