| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 68654 | 邓嘉瑶 | 13判断质数 | C++ | Wrong Answer | 1 MS | 272 KB | 265 | 2024-03-24 11:47:08 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n==2){ cout<<"Yes"; return 0; } for(int i=2;i<=n;i++){ if(n%i!=0){ cout<<"Yes"; return 0; } if(n%i==0){ cout<<"No"; return 0;} } return 0; }
------Input------
551
------Answer-----
No
------Your output-----
Yes