| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 56409 | 许兴平 | 素数个数 | C++ | Accepted | 0 MS | 240 KB | 233 | 2024-11-11 22:59:15 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,result=0; cin>>n; for(int i=2;i<=n;i++){ int m=i; for(int k=1;k<=i;k++){ if(i%k!=0) m--; } if(m==2) result++; } cout<<result; return 0; }