#零比特填充 while True: try: str1 = [] num = [] s = input() for x in s: str1.append(x) j = 0 for i in range(len(s)): if (str1[i] == '1'): j = j + 1 else: j = 0 if (j == 5): num.append(i + 1) # print("i:", i, "j:", j) j = 0 k = 0 for i in range(len(num)): str1.insert(num[i] + k, '0') k = k + 1 # print(str1) str2 = "".join(str1) print(str2) except EOFError: break
09-16
967
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-05
01-09
4286
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-03
2431
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)