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

Tests(10/10):


Code:

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