标签:
链接http://acm.swust.edu.cn/problem/277/
#include <stdio.h> int main() { int sum,num; num=0; scanf("%d",&sum); while(sum) { if(sum%2==1) { num++; } sum/=2; } printf("%d\n",num); return 0; }
标签:
原文地址:http://www.cnblogs.com/niconiconi/p/5721604.html