#298. 字符串首两字符条件移除
字符串首两字符条件移除
String First Two Chars 'x'
Background
Congcong is currently learning about string manipulation. He encountered an interesting problem that requires special handling of the beginning of a string.
Problem Description
Given a string, if one or both of the first 2 characters is 'x', return the string without those 'x' characters, and otherwise return the string unchanged. This is a little harder than it looks.
Input Format
Input is given from standard input in the following format.
s
Output Format
Output is given to standard output in the following format.
result_s
Sample
xHi
Hi
Hxi
Hi
Hi
Hi
Sample Explanation
For the first sample, the first character is 'x', so it is removed. For the second sample, the second character is 'x', so it is removed. For the third sample, neither of the first two characters is 'x', so the string remains unchanged.
Constraints
Time limit: 1s, Memory limit: 1024KiB for each test case.