#include <iostream> using namespace std; int main() { string str; string ans; int min = 20; cin >> str; int len = str.length(); int a[26] = {0}; for(int i = 0; i < len; i++){ a[str[i] - 'a']++; // 此时每个字符出现的次数已经记在数组中了 } for(int i = 0; i < 26; i++){ if( (a[i] > 0) && (a[i] < min) ){ min = a[i]; // 这是就找到了最少的出现次数 } } for(int i = 0; i < len; i++){ if(a[str[i] - 'a'] == min){ continue; } ans.append(1, str[i]); } cout << ans << endl; return 0; } // 64 位输出请用 printf("%lld")