Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
312673 冯琦浩 [在线测评解答教程] A+B 问题(有框架) C++ 解答错误 0 1 MS 268 KB 323 2025-03-15 11:22:27

Tests(0/11):


#include<bits/stdc++.h> using namespace std; bool is[1000005]; int pir(int x){ int sum=0; for(int i=2;i<=x;i++){ if(!is[i]){ for(int j=i;j<=x;j++){ is[j]=1; } if(is[i]){ sum++; } } } return sum; } int main(){ int n; scanf("%d",&n); printf("%d",pir(n)); return 0; }


测评信息: