#216. 递归移除字符串中的特定字符

    ID: 216 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-2gesp5递归字符串

递归移除字符串中的特定字符

Recursively Remove 'x'

Background

Congcong is currently learning string processing. He encountered an interesting problem that requires removing specific characters from a string.

Problem Description

Given a string, compute recursively a new string where all the 'x' chars have been removed.

Input Format

Input is given from standard input in the following format.

A string.

Output Format

Output is printed to standard output in the following format.

The new string after removing all 'x' characters.

Sample

xaxb
ab
abc
abc
xx

Sample Explanation

Sample 1: The string "xaxb" becomes "ab" after removing 'x'. Sample 2: The string "abc" contains no 'x', so it remains unchanged. Sample 3: The string "xx" becomes an empty string after removing all 'x'.

Constraints

1s, 1024KiB for each test case.