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