Advertisement
andreyminin

t1

Jan 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. using namespace std;
  4. int main() {
  5.     map<char, int> word;
  6.     char letter;
  7.     while(cin >> letter)
  8.         ++word[letter];
  9.     for (auto it = word.begin(); it != word.end(); ++it) {
  10.         if (it->second > 1)
  11.             cout << it->first;
  12.     }
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement