| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65601 | 余慕涵 | 判断素数II | C++ | Wrong Answer | 2 MS | 276 KB | 328 | 2024-01-26 18:10:12 |
#include <iostream> #include <cstdio> using namespace std; int a(int l){ int o=l,p,k=0; for(k=2;k<=o/2;k++){ if(o%k==0) p=1;} return p; } int main(){ int n,b,m=0,i; cin>>n; for (i=2;i<=n;i++) m+=a(i); cout<<n-m+1; return 0; }
------Input------
302
------Answer-----
62
------Your output-----
2