Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122128 刘益梵 判断质数(使用while循环) C++ Accepted 1 MS 276 KB 201 2025-06-14 11:58:17

Tests(10/10):


Code:

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