| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 32283 | 徐若宸 | 素数个数 | C++ | Wrong Answer | 0 MS | 244 KB | 257 | 2023-11-27 20:52:12 |
#include <bits/stdc++.h> using namespace std; bool maxn(int n){ if(n==1||n==0)return 0; for(int i=2;i*i<n;i++){ if(n%i==0)return 0; } return 1; } int main(){ int a,b=0; cin>>a; for(int i=2;i<a;i++){ if(maxn(i)) b++; } cout<<b; }