| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164644 | 汪明轩 | 判断素数 | C++ | Accepted | 3 MS | 272 KB | 291 | 2026-11-06 20:25:07 |
#include<bits/stdc++.h> using namespace std; bool ss(int x){ if(x==1) return false; else{ 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"; } }