标签:for count class elf nbsp ber += 剑指offer style
1 # -*- coding:utf-8 -*- 2 class Solution: 3 def NumberOf1(self, n): 4 count = 0 5 flag = 1 6 for i in range(32): 7 if n & flag: 8 count += 1 9 flag <<= 1 10 return count 11 # write code here
标签:for count class elf nbsp ber += 剑指offer style
原文地址:https://www.cnblogs.com/asenyang/p/11013097.html