int a
[5000],m
,n
;
cin
>> n
>>m
;
for (int i
=0;i
<=n
;++i
)
a
[i
] = 1;
for(int k
= 1; k
<= m
; ++k
)
for (int j
= 1; j
<= n
; ++j
)
{
if (j
% k
== 0)
a
[j
] = abs(a
[j
] - 1);
}
int out_number
= 1;
for (int t
= 1; t
<= n
; ++t
)
if (a
[t
] == 0)
{
if (out_number
== 1)
cout
<< t
;
else
{
cout
<< "," << t
;
}
out_number
= 0;
}
转载请注明原文地址:https://tech.qufami.com/read-17090.html