开灯问题(3-2)
作者:互联网
#include<stdio.h>
#include<string.h>
#define maxn 105
int a[maxn];
int main(){
int n,m;
scanf("%d%d",&n,&m);
memset(a,1,sizeof(a));
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
if(j%i==0)a[j]++;
}
}
for(int j=1;j<=n;j++){
if(a[j]%2==0)printf("%d ",j);
}
return 0;
}
标签:main,return,int,开灯,问题,maxn,printf,include 来源: https://blog.csdn.net/ykxdm1314/article/details/122014761