Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88026 | 张湘哲 | 14判断素数III | C++ | Wrong Answer | 0 MS | 272 KB | 258 | 2024-08-16 18:56:31 |
#include<iostream> using namespace std; int main() { int n; cin>>n; bool a; a=true; for(int i=2;i<=n;i++) { if(n%i==0) { a=false; break; } } if(a==true) { cout<<"YES"; } else { cout<<"NO"; } return 0; }
------Input------
991
------Answer-----
YES
------Your output-----
NO