#56. 字符串子串不重叠移除(不区分大小写)

    ID: 56 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-3gesp4字符串模拟

字符串子串不重叠移除(不区分大小写)

String Substring Removal

Background

[No specific background provided in original problem]

Problem Description

Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length 11 or more. Remove only non-overlapping instances, so with "xxx" removing "xx" leaves "x".

Input Format

The input consists of a single line containing two strings, base and remove, separated by a space.

base remove

Output Format

Output a single line containing the processed string, enclosed in double quotes ".

"processed_string"

Sample

Hello there llo
"He there"
Hello there e
"Hllo thr"
Hello there x
"Hello there"

Sample Explanation

Sample 1: Removing "llo" (case-insensitive) from "Hello there" results in "He there". Sample 2: Removing "e" (case-insensitive) from "Hello there" results in "Hllo thr". Sample 3: Removing "x" (case-insensitive) from "Hello there" results in "Hello there" as "x" is not found.

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.