fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. ios::sync_with_stdio(false);
  6. cin.tie(nullptr);
  7.  
  8. string S;
  9. if (!(cin >> S)) return 0;
  10.  
  11. int freq[26] = {0};
  12. for (char c : S) freq[c - 'a']++;
  13.  
  14. for (int i = 0; i < 26; ++i) {
  15. if (freq[i] == 1) {
  16. cout << char('a' + i) << '\n';
  17. return 0;
  18. }
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5300KB
stdin
odd
stdout
o