统计bit 1的个数

xiaoxiao2021-02-28  62

int hammingWeight(uint32_t n) { int res = 0; while(n) { n &= n - 1; ++res; } return res; }
转载请注明原文地址: https://www.6miu.com/read-77942.html

最新回复(0)