| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148539 | 刘益梵 | 判断素数II | C++ | Accepted | 14 MS | 280 KB | 290 | 2026-02-25 16:35:22 |
#include<bits/stdc++.h> using namespace std; int ooo(int n){ if(n<2){ return 0; } for(int i=2;i<n;i++){ if(n%i==0){ return 0; } } return 1; } int main(){ int a,s=0; cin>>a; for(int i=2;i<=a;i++){ if(ooo(i)==1){ s++; } } cout<<s; return 0; }