文章
67
粉丝
207
获赞
29
访问
39.8k
while True: try: str = input() str1 = list(str) index = 0 for i in range(0,len(str)): if str[i] =='1': index = i break len1 = 8-index sum = 0 for j in range(7,7-len1,-1): sum = sum + pow(2,7-j) * int(str[j]) print(sum) except: break
登录后发布评论
暂无评论,来抢沙发