自己看
2026-08-16 15:53:22
发布于:广东
9阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
ll n,m;
cin>>n>>m;
cout<<1;
for(ll i=2;i<=n;++i){
ll cnt=0;
for(ll j=1;j<=m;j++){
if(i%j==0) cnt++;
}
if(cnt%2==1) cout<<","<<i;
}
//fclose(stdin);
//fclose(stdout);
return 0;
}
//coder::by::M91
这里空空如也






有帮助,赞一个