| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164260 | 赵奕杰 | 判断素数II | C++ | Accepted | 167 MS | 280 KB | 274 | 2026-11-01 15:09:27 |
#include <bits/stdc++.h> using namespace std; int add(int x){ int cnt=0; bool f=1; for(int i=2;i<=x;i++){ for(int j=2;j<i;j++){ if(i%j==0) f=0; } if(f==1) cnt++; f=1; } return cnt; } int main(){ int n; cin>>n; cout<<add(n); return 0; }