题解 | #字符串分隔#数字不超过10^8,用int值来存每一位数
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
import java.io.*;
public class Main{
public static void main(String[] args) throws Exception{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String str;
while((str = bf.readLine()) != null){
StringBuffer sb = new StringBuffer();
int num = 0;
for(int i = str.length() - 1;i >= 0;i--){
if((num & (1 << (str.charAt(i) - '0'))) == 0){
sb.append(str.charAt(i));
num |= (1 << (str.charAt(i) - '0'));
}
}
System.out.println(sb);
}
}
}