Python
def get_count_1_of_value(value): count = 0 while(value > 0): value = value & (value - 1) count = count + 1 return count
博客园 © 2004-2026 浙公网安备 33010602011771号 浙ICP备2021040463号-3