Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98338 Kevin 判断质数(使用while循环) C++ Accepted 1 MS 272 KB 237 2024-11-19 15:23:38

Tests(10/10):


Code:

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