【Code Forces 320】
作者:互联网
#include<iostream>
#include<stdlib.h>
#include<string.h>
//#include<bits/stdc++.h>
//#include<cstdin>
using namespace std;
int main(){
int n;
scanf("%d",&n);
int sum=0;
while(n>0){
sum+=n%2;
n/=2;
}
printf("%d\n",sum);
return 0;
}
ujn20161222 发布了784 篇原创文章 · 获赞 19 · 访问量 6万+ 关注
标签:Code,int,sum,ujn20161222,320,Forces,文章,include 来源: https://blog.csdn.net/ujn20161222/article/details/103971617