Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123041 李林叡 判断质数(使用while循环) C++ Accepted 1 MS 276 KB 201 2025-06-22 15:57:23

Tests(10/10):


Code:

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