| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 83113 | sh25_shengmy | 素数个数 | C++ | 通过 | 0 MS | 240 KB | 304 | 2026-01-22 20:08:52 |
#include<iostream> using namespace std; bool cpr(int n){ for(int i=2;i<=n/2;++i){ if(n%i==0) return false; } return true; } int main(){ int n; cin>>n; int s=0; for(int ji=2;ji<=n;++ji){ if(cpr(ji)==true) ++s; } cout<<s; return 0; }