Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1814 莫业祁 判断质数(使用while循环) C++ Accepted 0 MS 264 KB 234 2023-11-11 17:53:21

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ int n,m=2; cin>>n; while(m<n){ if(n%m==0){ cout<<"No"<<endl; return 0; } m++; } cout<<"Yes"<<endl; }