Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1745 莫业祁 13判断质数 C++ Accepted 0 MS 256 KB 293 2023-11-04 18:21:29

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ bool a=true; int n; cin>>n; for(int i=2;i<=n-1;i++){ if(n%i==0){ a=false; } } if(a==false) cout<<"No"<<endl; else cout<<"Yes"<<endl; return 0; }