平平无奇

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int number = sc.nextInt();
            Set<Integer> numSet = new HashSet<>(); // set to record existed numbers
            int currentNum, result = 0;
            while (number > 0) {
                currentNum = number % 10;
                number /= 10;

                // check num duplicate
                if (numSet.contains(currentNum)) {
                    continue; // skip current round
                }

                numSet.add(currentNum); // upadte set
                result = result * 10 + currentNum;
            }

            System.out.println(result);
        }
    }
}