import sys
for line in sys.stdin:
skew = line.strip()
if skew == '0':
break
value, length = 0, len(skew)
for i in range(length):
digit = skew[i]
value += int(digit) * (2**(length-i)-1)
print(value)
KY51 Skew数
最新推荐文章于 2024-09-02 23:14:47 发布