摘要: 1,求一个十进制的数值的二进制的0、1的个数 def count_binary_digits(num): binary = bin(num)[2:] count_0 = binary.count('0') count_1 = binary.count('1') return count_0, cou 阅读全文
posted @ 2024-03-28 16:46 青鸢..i 阅读(6) 评论(0) 推荐(0) 编辑