A - Trimo
解説
/
/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 100 点
問題文
長さ N の文字列 S が与えられます。
S のうち先頭に連続する o をすべて取り除いた文字列を出力してください。
なお、 S 中のすべての文字が o である場合は空文字列を出力してください。
制約
- N は 1 \le N \le 50 を満たす整数
- S は英小文字からなる長さ N の文字列
入力
入力は以下の形式で標準入力から与えられる。
N S
出力
答えを出力せよ。
入力例 1
7 ooparts
出力例 1
parts
ooparts のうち先頭に連続する o をすべて取り除くと parts となります。
入力例 2
6 abcooo
出力例 2
abcooo
先頭の文字が o でない場合もあります。
入力例 3
5 ooooo
出力例 3
すべての文字が o である場合もあります。
Score : 100 points
Problem Statement
You are given a string S of length N.
Output the string obtained by removing all leading consecutive os from S.
If all characters in S are o, output an empty string.
Constraints
- N is an integer satisfying 1 \le N \le 50.
- S is a string of length N consisting of lowercase English letters.
Input
The input is given from Standard Input in the following format:
N S
Output
Output the answer.
Sample Input 1
7 ooparts
Sample Output 1
parts
Removing all leading consecutive os from ooparts gives parts.
Sample Input 2
6 abcooo
Sample Output 2
abcooo
The first character may not be o.
Sample Input 3
5 ooooo
Sample Output 3
All characters may be o.