| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65603 | 谢绍澜 | 判断素数II | C++ | Accepted | 10 MS | 272 KB | 307 | 2024-01-26 18:14:56 |
# include<iostream> using namespace std; bool a(int x){ for(int i=2;i<=x/2;i++){ if(x%i==0) return false; } return true; } int main(){ int n,c=0; cin>>n; for(int i=2;i<=n;i++){ if(a(i)) c++; } cout<<c; return 0; }