输入数值,就知道这个数值至少占用了多少内存:

a=int(input('请输入数值:'))

b=a.bit_length()

print(b)

 

posted on 2018-04-15 23:55  我赌,但我获胜  阅读(132)  评论(0编辑  收藏  举报