• + 0 comments

    Java solution:

    public static int findDigits(int n) {
            String strN = String.valueOf(n);
            
            int count = 0;
            
            for (char c : strN.toCharArray()) {
                int d = Integer.parseInt(String.valueOf(c));
                
                if (d != 0 && n % d == 0) count++;
            }
    
    
            return count;
        }