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