103440: [Atcoder]ABC344 A - Spoiler
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:9
Solved:0
Description
Score: $150$ points
Problem Statement
You are given a string $S$ consisting of lowercase English letters and |
. $S$ is guaranteed to contain exactly two |
s.
Remove the characters between the two |
s, including the |
s themselves, and print the resulting string.
Constraints
- $S$ is a string of length between $2$ and $100$, inclusive, consisting of lowercase English letters and
|
. - $S$ contains exactly two
|
s.
Input
The input is given from Standard Input in the following format:
$S$
Output
Print the answer.
Sample Input 1
atcoder|beginner|contest
Sample Output 1
atcodercontest
Remove all the characters between the two |
s and print the result.
Sample Input 2
|spoiler|
Sample Output 2
It is possible that all characters are removed.
Sample Input 3
||xyz
Sample Output 3
xyz
Input
Output
得分:150分
问题描述
给定一个包含小写英文字母和|
的字符串$S$。$S$保证恰好包含两个|
。
删除两个|
之间的字符,包括|
本身,并打印结果字符串。
约束
- $S$是一个长度在2到100之间的字符串,由小写英文字母和
|
组成。 - $S$恰好包含两个
|
。
输入
输入以标准输入的以下格式给出:
$S$
输出
打印答案。
样例输入1
atcoder|beginner|contest
样例输出1
atcodercontest
删除两个|
之间的所有字符并打印结果。
样例输入2
|spoiler|
样例输出2
可能所有的字符都被删除了。
样例输入3
||xyz
样例输出3
xyz