Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41020 | liusiyu | 输出N以内的素数 | C++ | Output Limit Exceeded | 42 MS | 240 KB | 201 | 2024-02-18 16:21:21 |
#include<bits/stdc++.h> using namespace std; int main() { int m; cin>>m; cout<<2<<endl<<3<<endl; for(int j=4;j<=m;j++){ if(j%2!=0&&j%3!=0){ cout<<j<<endl; } } return 0; }