Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
41018 liusiyu 输出N以内的素数 C++ 解答错误 45 MS 244 KB 209 2024-02-18 16:20:49

Tests(0/1):


#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&&j%7!=0){ cout<<j<<endl; } } return 0; }


测评信息: