| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 139523 | 袁龙浩 | 判断素数II | C++ | Compile Error | 0 MS | 0 KB | 553 | 2025-12-07 15:03:35 |
#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; cin>>n; for(int i=2;i<=n;i++){ t=i; if(i%j==0) s++; } if(s!=0){ b++; } } } int main(){ int n,x,b; cin>>n; a(n); cout<<b; return 0; }
Main.cc: In function 'int a(int)':
Main.cc:12:18: error: 'j' was not declared in this scope
if(i%j==0)
^
Main.cc:18:9: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Main.cc: At global scope:
Main.cc:19:5: error: expected declaration before '}' token
}
^