题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
vector<char> vctNUm;
string str_s;
cin >> str_s;
for (auto it = str_s.rbegin(); it != str_s.rend(); ++it){
auto it2 = find(vctNUm.begin(), vctNUm.end(), *it);
if (it2 == vctNUm.end()) {
vctNUm.push_back(*it);
}
}
for (auto it = vctNUm.begin(); it != vctNUm.end(); ++it)
{
cout << *it;
}
}
// 64 位输出请用 printf("%lld")


