| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84348 | 何思佳 | 判断素数 | C++ | Output Limit Exceeded | 1 MS | 268 KB | 316 | 2024-07-15 16:41:54 |
#include<bits/stdc++.h> using namespace std; int sum=0; bool zs(int n){ for(int j=2;j<n;j++){ if(n%j==0){ return false; } } return true; } int main() { int n; int s=0; cin>>n; for(int i=2;i<=n;i++){ if(zs(i)){ cout<<"Yes"; } else { cout<<"No"; } } return 0; }