| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158981 | 刘杨国卿 | 判断素数II | C++ | Accepted | 16 MS | 276 KB | 266 | 2026-08-24 12:12:35 |
#include<bits/stdc++.h> using namespace std; bool l(int m){ for(int i=2;i<m;i++){ if(m%i==0){ return false; } } return true; } int main(){ long long n,s=0; cin>>n; for(int i=2;i<=n;i++){ if(l(i)) s++; } cout<<s; return 0; }