@Override
    public Long solve() {

        long sum = 0;
        
        final int[] d = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
        
        do {
            if (getNumber(d[7], d[8], d[9]) % 17 != 0) continue;
            if (getNumber(d[6], d[7], d[8]) % 13 != 0) continue;
            if (getNumber(d[5], d[6], d[7]) % 11 != 0) continue;
            if (getNumber(d[4], d[5], d[6]) %  7 != 0) continue;
            if (getNumber(d[3], d[4], d[5]) %  5 != 0) continue;
            if (getNumber(d[2], d[3], d[4]) %  3 != 0) continue;
            if (getNumber(d[1], d[2], d[3]) %  2 != 0) continue;
            sum += getNumber(d);
        } while (nextPermutation(d));

        return sum;
    }