文章
19
粉丝
0
获赞
66
访问
3.3k
#include<bits/stdc++.h> using namespace std;
int main(){ int x; cin >> x; int count = 0; while(x > 0){ if((x&1) == 1){ count++; } x = x>>1; } cout << count << endl; }
登录后发布评论
暂无评论,来抢沙发