题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
cin >> a;
int temp;
int map[10] = {0};
while(a){
temp = a % 10;
if(map[temp] == 0){
cout << temp;
map[temp]++;
}
a = a / 10;
}
return 0;
}
// 64 位输出请用 printf("%lld")
