提交时间:2025-10-28 10:25:32

运行 ID: 71748

#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; int off[n]={0}; bool first=true; for(int i=1;i<=m;i++){ for(int j=0;j<n;j++){ if(j%i==0){ off[j]=1-off[j]; } } } for(int i=0;i<n;i++){ if(off[i]==1){ if(first==false){ cout<<","; } cout<<i; first=false; } } return 0; }