@@ -0,0 +1,1727 @@
+package algorithms.implementation;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Problem Statement: %0D%0A * You are given an integer N. Find the digits in this number that exactly%0D%0A * divide N (division that leaves 0 as remainder) and display their count. For%0D%0A * N=24, there are 2 digits (2 & 4). Both of these digits exactly divide 24. So%0D%0A * our answer is 2.%0D%0A * %0D%0A * Note: %0D%0A * If the same number is repeated twice at different positions, it should be%0D%0A * counted twice, e.g., For N=122, 2 divides 122 exactly and occurs at ones' and%0D%0A * tens' position. So for this case, our answer is 3.%0D%0A * Division by 0 is undefined.%0D%0A * %0D%0A * Input Format: %0D%0A * The first line contains T (the number of test cases), followed by T lines%0D%0A * (each containing an integer N).%0D%0A * %0D%0A * Constraints:%0D%0A * 1 %3C= T %3C= 15%0D%0A * 0 %3C= N %3C= 1010%0D%0A * %0D%0A * Output Format: %0D%0A * For each test case, display the count of digits in N that exactly divide N in%0D%0A * a separate line.%0D%0A * %0D%0A * Sample Input: %0D%0A * 2%0D%0A * 12%0D%0A * 1012%0D%0A * %0D%0A * Sample Output: %0D%0A * 2%0D%0A * 3%0D%0A */%0D%0Apublic class FindDigits %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        %0D%0A        int numCases = sc.nextInt();%0D%0A        %0D%0A        for (int i = 0; i %3C numCases; i++) %7B%0D%0A            int count = 0;%0D%0A            %0D%0A            String num = sc.next();%0D%0A            int n = Integer.parseInt(num);%0D%0A            %0D%0A            for (int j = 0; j %3C num.length(); j++) %7B%0D%0A                int digit = Character.getNumericValue(num.charAt(j));%0D%0A                %0D%0A                if (digit != 0 && n %25 digit == 0) %7B%0D%0A                    count++;%0D%0A                %7D%0D%0A            %7D%0D%0A            System.out.println(count);%0D%0A        %7D%0D%0A        sc.close();%0D%0A    %7D%0D%0A%7D

Add FindDigits