Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6358 先明缜 判断质数(使用while循环) C++ Wrong Answer 0 MS 268 KB 417 2025-02-15 20:06:22

Tests(0/10):


Code:

#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==1){ cout<<"no"<<endl; }else{ cout<<"yes"<<endl; } return 0; }


Run Info:

------Input------
560
------Answer-----
No
------Your output-----
yes