Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6361 | 先明缜 | 判断质数(使用while循环) | C++ | Wrong Answer | 0 MS | 272 KB | 417 | 2025-02-15 20:08:58 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int i; int n; i=2; cin>>n; bool flag=0; while(i>n){ if(n%i==0){ flag=1; break; } i++; } if(flag==0){ cout<<"No"<<endl; }else{ cout<<"Yes"<<endl; } return 0; }
------Input------
313
------Answer-----
Yes
------Your output-----
No