#256. 字符串移除中间字符

    ID: 256 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-2gesp3字符串条件结构

字符串移除中间字符

Remove Middle 'x'

Background

None.

Problem Description

Given a string, return a version where all the "x" have been removed. Except an "x" at the very start or end should not be removed.

Input Format

The input consists of a single line containing a string.

s

Output Format

Output a single line containing the processed string.

result

Sample

xxHxix
xHix
abxxxcd
abcd
xabxxxcdx
xabcdx

Sample Explanation

Sample 1: For the string "xxHxix\