K12教育赛事综合服务平台
专注青少年竞赛题库网站
聚乐之家官方网站
下载聚乐之家官方App
#include <iostream> using namespace std; int main() { int x, ans = 0; cin >> x; while (x != 0) { x -= x & -x; ans++; } cout << ans << endl; return 0; }
7
8
9
11