| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 139522 | 袁龙浩 | 判断素数II | C++ | Compile Error | 0 MS | 0 KB | 590 | 2025-12-07 15:00:40 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int a(int x){ int s=0,b=0,t,n; for(int i=2;i<=n;i++){ t=i; for(int j=2;j<=t;j++){ if(i%j==0){ s++; } } if(s!=0){ b++; } } } int main(){ int n; cin>>n; a(n); cout<<b; return 0; }
Main.cc: In function 'int a(int)':
Main.cc:20:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Main.cc: In function 'int main()':
Main.cc:25:11: error: 'b' was not declared in this scope
cout<