def a(s): x=1 count=0 b=bin(s) print(b) count=b.count('1') print(count) s=int(input("请输入一个正整数")) a(s) 赞微海报分享
近期评论