题解 | 表示数字

s=input()

start=False

res=""

for c in s:
    if c.isdigit():
        if not start:
            start=True
            res+="*"
        
        
    else:
        if start:
            res+="*"
            start=False
    res+=c
if start:
    res+="*"
print(res)

全部评论

相关推荐

后端彭于晏:你无敌了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务