#include<stdio.h>
bool lights[100] = {0};
int main()
{
int n,step,i,numLighted = 0;
scanf("%i",&n);
for(step=1;step<=n;step++)
for(i=0;i<100;i+=step)
lights[i] ^= 1;
for(i=0;i<100;i++)
if(lights[i])
numLighted++;
printf("%i",numLighted);
return 0;
}
转载于:https://www.cnblogs.com/zhangdongdong/p/3443089.html