• + 0 comments
    static int divisibleNumbers(int n) {
            /*
             * Write your code here.
             */
            int a;
            for (int i = n; ; i += n) {
                int sum = 0, product = 1, q = i, count = 0;
                boolean flag = true;
                while (q > 0) {
                    int rem = q % 10;
                    if (rem == 0) {
                        flag = false;
                        break;
                    }
                    sum += rem;
                    product *= rem;
                    count++;
                    q /= 10;
                }
                if (flag) {
                    if (sum >= product) {
                        a = count;
                        break;
                    }
                    else
                        continue;
                }
                continue;
            }
            return a;
        }
    

    I'm really not getting what to do about this???