| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 76578 | sh25_shenpy | 素数个数 | C++ | Accepted | 0 MS | 196 KB | 293 | 2025-12-19 15:30:47 |
#include <cstdio> int n, cnt; bool prime[50010]; int main() { scanf("%d", &n); for(int i = 2;i <= n; i++) { if(prime[i]) continue; for(int j = 2 * i; j <= n; j += i) prime[j] = true; } for(int i = 2; i <= n; i++) if(!prime[i]) cnt++; printf("%d", cnt); return 0; }