| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 41073 | liusiyu | 练60.5 素数筛选 | C++ | No Test Data | 0 MS | 0 KB | 317 | 2024-02-19 09:50:08 |
#include<bits/stdc++.h> using namespace std; int main() { int cnt=0; bool m; for(int i=2;i<=100;i++){ m=true; for(int j=2;j<i;j++){ if(i%j==0){ m=false; break; } } if(m==true){ cout<<i<<" "; cnt++; } } cout<<"100以内的素数个数:"<<cnt; return 0; }