2022年8月24日

LeetCode338 比特位计数

摘要: LeetCode338 比特位计数 class Solution: def countBits(self, n: int) -> List[int]: def cnt(x: int) -> int: ones = 0 while x > 0: x = x & (x - 1) ones = ones 阅读全文

posted @ 2022-08-24 16:56 solvit 阅读(26) 评论(0) 推荐(0)

导航