摘要: 一.欧拉筛求素数 for (int i = 2; i <= n; i++) { if (!pri[i]) ans[++tot] = i; for (int j = 1; (j <= tot) && (i * ans[j] <= n); j++) { pri[i * ans[j]] = 1; if ( 阅读全文
posted @ 2021-04-08 19:19 蛙蛙1551 阅读(62) 评论(0) 推荐(1) 编辑