#146. 字符串条件提取
字符串条件提取
First Two Chars
Background
No specific background provided.
Problem Description
Given a string, return a string made of the first 2 characters (if present). However, include the first character only if it is 'o' and include the second character only if it is 'z'. For example, "ozymandias" yields "oz".
Input Format
Input is given from standard input in the following format.
s
Output Format
Output is printed to standard output in the following format.
result
Sample
ozymandias
"oz"
bzoo
"z"
oxx
"o"
Constraints
Time limit: 1s, Memory limit: 1024KiB for each test case.