Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6004 吴承熹 判断质数(使用while循环) C++ Accepted 0 MS 264 KB 218 2024-12-28 09:28:07

Tests(10/10):


Code:

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