Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103679 | 王仲炜 | 判断素数 | C++ | Compile Error | 0 MS | 0 KB | 442 | 2024-12-29 14:46:38 |
#include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i,m; cin>>m; for(i=2;i<=m;i++) { if(m%i==0) { cout<<"prime"; } } if(i==m) cout<<"not prime"; return 0; }
Main.cc: In function 'int main()': Main.cc:8:5: error: 'cin' was not declared in this scope cin>>m; ^ Main.cc:13:21: error: 'cout' was not declared in this scope cout<<"prime"; ^ Main.cc:17:9: error: 'cout' was not declared in this scope cout<<"not prime"; ^