题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include <deque>
#include <iostream>
using namespace std;
int main() {
deque<int> q;
int a, b[10]={0};
while (cin >> a ) { // 注意 while 处理多个 case
// cout << a << endl;
}
while (a!=0) {
int yushu=a%10;
q.push_back(yushu);
a=a/10;
}
while (!q.empty()) {
int temp = q.front();
q.pop_front();
if (b[temp] == 0) {
cout<<temp;
b[temp]++;
}
}
}
// 64 位输出请用 printf("%lld")
