1491: 选择你喜爱的水果
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:3
Description
程序中保存了七种水果的名字,要求用户输入一个与水果有关的句子。程序在已存储的水果的名字中搜索,以判断句子中是否包含其中水果的名称。如果包含,则用词组“Brussels sporouts”替换句子中出现的水果单词,并输出替换后的句子。如果句子中没有出现这些水果的名字,则输出:apples,bananas,peaches,cherries,pears,oranges,strawbarries。
Input
输出格式:有多行,每行是一个字符串(长度不超过200.)每行输入中只会有一个水果名称,不会存在1行输入包括多种水果名称或重复水果名称的情况。
Output
如果包含水果单词,则用词组“Brussels sporouts”替换句子中出现的水果单词,并输出替换后的句子。如果句子中没有出现这些水果的名字,则输出“You must not enjoy fruit.”。
Sample Input Copy
I really love peaches on my cereal.
I'd rather have a candy bar.
apples are wonderful with lunch.
Sample Output Copy
I really love Brussels sporouts on my cereal.
You must not enjoy fruit.
Brussels sporouts are wonderful with lunch.