题解 | #表示数字#

表示数字

https://www.nowcoder.com/practice/637062df51674de8ba464e792d1a0ac6

ent = input()
out = ' '

for i in range(len(ent)):
    if not ent[i].isdecimal():
        if not out[-1].isdecimal():
            out += ent[i]
        else:
            out += '*'+ ent[i]
    else:
        if not out[-1].isdecimal():
            out += '*'+ ent[i]
        else:
            out += ent[i]
if ent[-1].isdecimal():
    out += '*'
print(out[1:])

全部评论

相关推荐

10-20 16:50
门头沟学院 Java
牛客68421677...:同是天涯沦落人啊,我也是26届0实习,不知道怎么办了
点赞 评论 收藏
分享
09-26 19:45
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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