Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
163913 冉骏杰 判断质数(使用while循环) C++ Accepted 1 MS 272 KB 213 2026-10-31 14:48:10

Tests(10/10):


Code:

#include<iostream> using namespace std; int a,b = 1,c; int main() { cin>>a; while(b<=a){ if(a%b==0){ c = c+1; } b++; } if(c == 2){ cout<<"Yes"; }else{ cout<<"No"; } return 0; }