Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
4787 | 朱彦蔚 | 判断质数(使用while循环) | C++ | Accepted | 0 MS | 264 KB | 253 | 2024-09-16 15:54:16 |
# include<iostream> using namespace std; int main(){ int x,i=2; cin>>x; if(x<2) {cout<<"No";return 0;} while(x%i!=0){ i++; } if(i==x){ cout<<"Yes"; } else cout<<"No"; return 0; }