String Remover

View as PDF

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


  • -1
    Steve  commented on Nov. 30, 2023, 2:20 p.m.

    you irl


  • 7
    Rod  commented on Nov. 30, 2023, 1:56 p.m.

    elilisk

    enter image description here

    • -1
      derek  commented on Nov. 30, 2023, 2:05 p.m.

      Rod


      • -1
        Rod  commented on Nov. 30, 2023, 2:31 p.m.

        dewekgu


  • 3
    derek  commented on Nov. 30, 2023, 1:48 p.m.