| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67471 | 石茂诤 | 判断素数II | C++ | Accepted | 12 MS | 280 KB | 278 | 2024-03-16 16:08:57 |
# include<bits/stdc++.h> using namespace std; bool s(int q){ for(int j=2;j<q;j++){ if(q%j==0){ return 0; } } return 1; } int main(){ int m,c=0; cin>>m; for(int i=2;i<=m;i++){ if(s(i)){ c++; } } cout<<c; return 0; }