文章
69
粉丝
66
获赞
访问
5.9k
#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; }
登录后发布评论
暂无评论,来抢沙发