| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138835 | 张文浩 | 判断质数(使用while循环) | C++ | Wrong Answer | 1 MS | 268 KB | 220 | 2025-11-30 11:25:18 |
#include<bits/stdc++.h> using namespace std; int main(){ bool s=1; int i,n=2; cin>>i; while(n>i){ if(i%n==0){ s=0; } } if(s==1){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }
------Input------
157
------Answer-----
Yes
------Your output-----
YES