| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 32280 | 徐若宸 | 素数个数 | C++ | Compile Error | 0 MS | 0 KB | 258 | 2023-11-27 20:51:38 |
#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<=n;i++){ if(maxn(i)) b++; } cout<<b; }