题解 | #字符串分隔#

字符串分隔

https://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7

mystr = input()
a = len(mystr) % 8
b = int(len(mystr) / 8)
start = 0
for i in range(b):
    print(mystr[start:start+8])
    start += 8

if a:
    tmpstr = mystr[b*8:b*8+a] + "0"*(8-a)
    print(tmpstr)

全部评论

相关推荐

夏目LTH:这个真的很看运气,多投吧。我从去年十二月底一直投到现在,之前没一个offer,结果两周前投的一家面试官聊的特别好,直接速通offer还给的SP待遇开的比我期望都够。
我的求职进度条
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务