Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
75686 sh25_zhuwy 判断一个数是否为质数 C++ 通过 0 MS 248 KB 317 2025-12-09 14:03:46

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int i; cin>>i; int sum=0; for(int j=1;j<=i;j++) { if(i%j==0) { sum++; } } if(sum==2) { cout<<"yes"; } else { cout<<"no"; } return 0; }


测评信息: