Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41016 | liusiyu | 输出N以内的素数 | C++ | Output Limit Exceeded | 0 MS | 248 KB | 210 | 2024-02-18 16:18:11 |
//找素数 #include<iostream> using namespace std; int main() { int m; cin>>m; cout<<2<<" "<<3<<" "; for(int j=4;j<=m;j++){ if(j%2!=0&&j%3!=0){ cout<<j<<" "; } } return 0; }