Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128983 daichenxi 求素数 C++ 输出超限 0 20 MS 248 KB 250 2024-01-26 14:37:57

Tests(0/1):


#include <bits/stdc++.h> using namespace std; int maxn=1000000; bool check(int x) { for(int i=2;i*i<=x;i++) if(x%i==0) return false; return true; } int main() { for(int i=2;i<=maxn;i++) if(check(i)) cout<<i<<" "; return 0; }


测评信息: