Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
56007 luchenhao2024 素数个数 C++ Wrong Answer 0 MS 240 KB 348 2024-11-08 19:03:49

Tests(0/1):


#include <bits/stdc++.h> using namespace std; int main() { int n,cnt=0; cin>>n; for(int i=2;i<=n;i++){ int s=0; for(int j=2;j<=sqrt(i);j++){ if(i%j==0){ s=1; break; } } if(s==0){ cnt+=1; } } return 0; }


Judgement Protocol: