Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140002 罗晟睿 判断质数(使用while循环) C++ Accepted 0 MS 276 KB 241 2025-12-13 14:12:55

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m; bool b=1; cin>>m; for(int i=2;i<=m-1;i++){ if(m%i==0){ b=0; } } if(b==0){ cout<<"No"; } else{ cout<<"Yes"; } return 0; }