Submit solution
Points:
4
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java
Given a sentence, you must remove a certain word from it.
Input
The first line is a series of words with all lowercase letters separated by a single space each.
The second line is the word that must be removed from the above line.
Output
Print the first line after removing all occurrences of the key word. Ensure there are not consecutive spaces.
Sample Input
this is a sentence
is
Sample Output
this a sentence
Comments