Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
128987 | std | 求素数 | C++ | 通过 | 100 | 26 MS | 248 KB | 240 | 2024-01-26 14:40:39 |
#include<bits/stdc++.h> using namespace std; #define int long long main() { for(int i=2;i<=100000;i++) { int c=1; for(int j=2;j<=sqrt(i);j++) { if(i%j==0) { c=0; break; } } c&&printf("%d ",i); } }