#E. 二级202109-5替换单词

    Type: Default 1000ms 256MiB

二级202109-5替换单词

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

输入一个字符串,以回车结束(字符串长度<=100)。该字符串由若干个单词组成,单词之间用一个空格隔开,所有单词区分大小写。现需要将其中的某个单词替换成另一个单词,并输出替换之后的字符串。

输入

输入包括 3 行,第 1 行是包含多个单词的字符串 s; 第 2 行是待替换的单词 a(长度 <= 100);第 3 行是 a 将被替换的单词 b(长度 <= 100). s, a, b 最前面和最后面都没有空格.

输出

输出只有 1 行,将 s 中所有单词 a 替换成 b 之后的字符串。

样例输入

You want someone to help you

You

I

样例输出

I want someone to help you

二级第6轮

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
5
Start at
2023-7-30 22:15
End at
2023-8-19 2:15
Duration
460 hour(s)
Host
Partic.
9