标签:class mes its The size name using ons namespace
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; int main() { /*素数筛选*/ /*Eratosthenes筛选*/ /*确定某一个数是素数之后,删除这个数的所有的倍数*/ int n; cin >> n; memset(vis, 0, sizeof(vis)); for(int i = 2; i <= sqrt(n); i++) if(!vis[i]) for(int j = i * i; j <= n; j += i) vis[j] = 1; }
标签:class mes its The size name using ons namespace
原文地址:https://www.cnblogs.com/Kohinur/p/9070855.html