题解 | #字符串分隔#
字符串分隔
http://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7
while True: try: s = input().split()[0] except EOFError: break n = int(len(s)/8) #长度超过8 for i in range(n): start = i*8 end = (i+1)*8 print(s[start:end].__str__()) substr = s[n*8:len(s)] if not substr:#恰好是8的整数倍 continue num = 8 - len(substr) while num > 0: substr += '0' num -= 1 print(substr.__str__())