| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 116127 | 陈铎文 | 判断素数II | C++ | Wrong Answer | 0 MS | 268 KB | 333 | 2025-04-06 14:13:16 |
#include<iostream> using namespace std; int s=0; bool t=true; int f(int n){ for(int i=1;i<=n;i++){ for(int j=1;j<=i;j++){ if(i%j==0){ t=false; } } if(t=true) s++; } cout<<s; } int main(){ int a; cin>>a; f(a); return 0; }
------Input------
302
------Answer-----
62
------Your output-----
302