public String getAnswer() throws Exception {
        int retVal = 0;
        boolean [][] duplicates = new boolean[101][101];

        //Too avoid using big ints, I simply mark duplicates

        for (int a = 2; a<= 100; a++) {
            int power = a*a;
            for (int b = 2; power<= 100; b++) {
                for (int i = 2;i<b*100;i++)
                    if (i%b == 0)
                    {
                        int d = i/b;
                        if (d<=100 && hasLowerDivisor(i,b))
                            duplicates[power][d] =true;
                    }
                power*=a;
            }
        }

        for (int i = 2;i < duplicates.length; i++)
            for (int j = 2; j<duplicates[i].length; j++)
                if (!duplicates[i][j])
                    retVal++;

        return Integer.toString(retVal);
    }