- C++
我是装逼大佬
- 2025-4-3 16:51:26 @
#include <iostream>
#include <cstring>
using namespace std;
const int MAXN = 1e5 + 5;
bool isPrime[MAXN];
int T = 1;
void init()
{
memset(isPrime, 1, sizeof isPrime);
isPrime[1] = 0;
for (int i = 2; i < MAXN; ++i)
{
if(isPrime[i])
{
for (int j = 2; j * i < MAXN; ++j) isPrime[i * j] = 0;
}
}
}
void work()
{
//do sth.
}
int main()
{
//cin >> T;
while (T--) work();
return 0;
}
有不会的同学可在评论at我。 @[](/user/369)这是at我的md。
0 comments
No comments so far...