时间轴 2025-11-25 init 题目: P191 位1的个数https://leetcode.cn/problems/number-of-1-bits/description/?envType=study-plan-v2&envId=top-interview-150 可以直接使用内置函数__builtin_popcount 1234567class Solution { public: int hammingWeight(int n) { return __builtin_popcount(n); }};