标签:style color os 数据 io re c div
3 4 6 7
1 2 3
#include<stdio.h>
int main()
{
int n,m,count;
scanf("%d",&n);
while(n--)
{
count=0;
scanf("%d",&m);
while(m)
{
if(m%2==0)
{
m/=2;
}
else
{
count++;
m/=2;
}
}
printf("%d\n",count);
}
return 0;
}
标签:style color os 数据 io re c div
原文地址:http://blog.csdn.net/qq_16767427/article/details/38083995