| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 153270 | zyh | 判断质数(使用while循环) | C++ | Compile Error | 0 MS | 0 KB | 341 | 2026-05-11 16:36:01 |
#include<cmath> using namespace std; int main(){ int n,i; cin>>n; bool flag = 0; i=2; while(i<n) { if(n%i==0) { flag = 1; break; } i++; } if(flag == 0) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:4: error: 'cin' was not declared in this scope
cin>>n;
^
Main.cc:18:7: error: 'cout' was not declared in this scope
cout<<"Yes"<