题解 | 字符串分隔
字符串分隔
https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
def solve():
input_str = input().strip()
str_len = len(input_str)
count = str_len // 8
left = str_len % 8
for i in range(count):
print(input_str[i * 8 : (i + 1) * 8])
if left > 0:
print(input_str[count * 8 :] + "0" * (8 - left))
def main():
solve()
if __name__ == "__main__":
main()
大寒节气下雪了,刷道题吧!!
#当发现同事想辞职##工作压力大怎么缓解#