Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
144752 万骏博 判断素数II C++ Accepted 246 MS 268 KB 287 2026-01-24 17:11:20

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int o=0,x,y,p=0; void ys(int x){ for(int i=2;i<=x;i++){ for(int j=1;j<=x;j++){ if(i%j==0){ p++; } } if(p==2){ o++; } p=0; } printf("%d\n",o); } int main(){ scanf("%d",&x); ys(x); return 0; }