| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84055 | 石晋骁 | 判断素数II | C++ | Wrong Answer | 1 MS | 268 KB | 356 | 2024-07-15 11:19:39 |
#include<bits/stdc++.h> using namespace std; int sum(int a){ int c = 0; int d = 0; for(int i = 2;i <= a;i++){ d = 0; for(int j = 1;j < i;j++){ if(i % j != 0){ d = 0; }else { d = 1; } } if(d == 0){ c++; } } cout << c; } int main(){ int n; cin >> n; sum(n); return 0; }
------Input------
302
------Answer-----
62
------Your output-----
300