/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 200 点
問題文
英小文字からなる文字列 S が与えられます。 S の中で出現回数が最も多い文字をすべて取り除き、残った文字を元の順序を保ったまま連結して出力してください。
なお、出現回数が最大の文字が複数種類ある場合は、そのすべてを取り除いてください。
制約
- 1 \le |S| \le 100
- S は英小文字からなる文字列である
入力
入力は以下の形式で標準入力から与えられる。
S
出力
答えを出力せよ。
入力例 1
mississippi
出力例 1
mpp
mississippi に最も多く出現する文字は s と i でともに 4 回出現します。s と i をすべて取り除いた文字列は mpp となります。
入力例 2
atcoder
出力例 2
入力例 3
beginner
出力例 3
bgir
Score : 200 points
Problem Statement
You are given a string S consisting of lowercase English letters. Remove all occurrences of the most frequent character(s) in S, then output the remaining characters concatenated in their original order.
If there are multiple characters with the maximum frequency, remove all of them.
Constraints
- 1 \le |S| \le 100
- S is a string consisting of lowercase English letters.
Input
The input is given from Standard Input in the following format:
S
Output
Output the answer.
Sample Input 1
mississippi
Sample Output 1
mpp
The most frequent characters in mississippi are s and i, each appearing four times. Removing all occurrences of s and i yields the string mpp.
Sample Input 2
atcoder
Sample Output 2
Sample Input 3
beginner
Sample Output 3
bgir