public void Solve() {
        HashSet<Integer> numbers = new HashSet<Integer>();

        for (int a = 1; a < 100; a++) {
            for (int b = a; b < 10000; b++) {
                int c = a * b;
                ArrayList<Integer> temp = new ArrayList<Integer>();
                temp.addAll(GetDigits(a));
                temp.addAll(GetDigits(b));
                temp.addAll(GetDigits(c));

                if (temp.size() == 9) {
                    boolean areAllThere = true;
                    for (int i = 1; i < 10 && areAllThere; i++) {
                        areAllThere = temp.contains(i);
                    }

                    if (areAllThere) {
                        System.out.println("a=" + a + ", b=" + b + ", a * b = c =" + c);
                        numbers.add(c);
                    }
                }
            }
        }

        long result = 0;
        for (Iterator<Integer> it = numbers.iterator(); it.hasNext();) {
            result += it.next();
        }

        System.out.println("Result=" + result);
    }