Lanmon
Lanmon
题解
实现位运算
全部文章
题解
扩展思维(1)
归档
标签
去牛客网
登录
/
注册
实现位运算
609 浏览
0 回复
2020-07-06
Lanmon
+关注
求int型正整数在内存中存储时1的个数
https://www.nowcoder.com/practice/440f16e490a0404786865e99c6ad91c9?tpId=37&&tqId=21238&rp=1&ru=/ta/huawei/&qru=/ta/huawei/question-ranking
@
华为算法题
python实现
a = int(input()) c = 0 while a: b = a % 2 if b: c += 1 a = int(a/2) print(c)
python
华为算法题
举报
收藏
赞
评论加载中...