题解 | #字符串分隔#

字符串分隔

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

line = input()
s = ''
long = 0
for i in line:
    long += 1
    s += i
    if long == 8 :
        print(s)
        s = ''
        long = 0
if long != 0:
    for i in range(8-long):
        s += '0'
    print(s)

#原始一点点的解法#
原始一点点的解法 文章被收录于专栏

尽量不借助面向对象的思想,自己去实习具体过程

全部评论

相关推荐

榕城小榕树:1200单休,我去干点啥别的不好
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 12:02
ssob上原来真有BOSS啊
硫蛋蛋:这种也是打工的,只不是是给写字楼房东打工
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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