Generation

testsThu, 10 Nov 2022

#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; stringstream ss; set<char> s; for (char c : S) { if (s.find(c) != s.end()) { ss << c << endl; break; } else { s.insert(c); } } string output; if (ss >> output) { cout << output << endl; } else { cout << "None" << endl; } }

### code-snippets (with copy-to-clipboard button)

Questions about programming?Chat with your personal AI assistant