各类模板

int n = 1e7;
for (int i = 2; i <= n / i; ++i) if (!pri[i]) for (int j = i * i; j <= n; j += i) pri[j] = 1;

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务