B.沼跃鱼 | |||||
| |||||
Description | |||||
fjxmlhx每天都在被沼跃鱼刷屏,因此他急切的找到了你希望你写一个程序屏蔽所有句子中的沼跃鱼(“marshtomp”,不区分大小写)。 | |||||
Input | |||||
输入包括多行。每行是一个字符串,长度不超过200。 一行的末尾与下一行的开头没有关系。 | |||||
Output | |||||
输出包含多行,为输入按照描述中变换的结果。 | |||||
Sample Input | |||||
The Marshtomp has seen it all before. marshTomp is beaten by fjxmlhx! AmarshtompB | |||||
Sample Output | |||||
The fjxmlhx has seen it all before. fjxmlhx is beaten by fjxmlhx! AfjxmlhxB | |||||
Hint | |||||
不存在mar shto mp这种用空格分开的情况。 有可能一个句子中有两个以上“marshtomp”。
当时水平很差劲,不过我感觉最近 进步特别快,肯定跟最近的勤奋有关。回过头来 在做这个题目。感觉挺容易了!进步是能感觉到滴…………~! 校赛决赛被人虐惨了!唉~但现在我也会了! 方法是 用find()查找一个字符串中所有出现marshtomp的索引值,用一个数组记录。然后 再将原数组挨个元素输出,到达记录的索引值时打印 替换值,里面有很多具体细节 。
|
哈理工 第五届程序设计大赛——B.沼跃鱼
最新推荐文章于 2022-05-21 22:05:29 发布