| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164667 | 赵锦鹏 | 判断素数 | C++ | Accepted | 1 MS | 268 KB | 303 | 2026-11-07 09:27:34 |
#include<bits/stdc++.h> using namespace std; bool ss(int x) { if(x==1) return false; for(int i=2;i<=sqrt(x);i++) { if(x%i==0) { return false; } } return true; } int main() { int n; cin>>n; if(ss(n)) { cout<<"Yes"; } else { cout<<"No"; } return 0; }