文章
117
粉丝
69
获赞
866
访问
120.1k
#include<bits/stdc++.h> using namespace std; int n, cnt; int main() { cin >> n; while(n) { if(n & 1) cnt ++; n >>= 1; } printf("count0=%d count1=%d", 32 - cnt, cnt); return 0; }
登录后发布评论
暂无评论,来抢沙发