题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b=0;
vector<int> array(10,0);
cin >> a;
while((a/10 > 0)||(a%10 > 0)){
if (array[a%10] == 0)
{
//桶排序实现
array[a%10] = 1;
b = b *10 + a%10;
}
a/=10;
}
cout << b << endl;
return 0;
}

