题解 | 年轻人不讲5的

年轻人不讲5的

https://www.nowcoder.com/practice/504e04804610463facbedaad9a8c742e

#include <iostream>
using namespace std;
#include <algorithm>
int main() {
    string str;
    cin>>str;
    auto it = find(str.begin(),str.end(),'5');
    while(it!=str.end())
    {
        *it = '*';
        it = find(it+1,str.end(),'5');
    }
    cout<<str;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 17:58
怎么感觉全世界都转码了
忧郁的柜子66:其实是计算机行业特有的开源共享精神
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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