@@ -0,0 +1,1100 @@
+package array;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Scanner;%0Aimport java.util.Set;%0A%0A/**%0A * @see %3Ca href=%22https://www.hackerrank.com/challenges/find-digits%22%3Ehacker rank%3C/a%3E%0A */%0Apublic class HackerrankFindDigits %7B%0A%0A    private static void calculate(Scanner s) %7B%0A        Integer t = s.nextInt(); // here%0A%0A        char%5B%5D digits = String.valueOf(t).toCharArray();%0A        int r = 0;%0A        Set%3CInteger%3E divisible = new HashSet();%0A        for (int i = 0; i %3C digits.length; i++) %7B%0A            if (digits%5Bi%5D == '0') %7B // here%0A                continue;%0A            %7D%0A            if (divisible.contains((int) digits%5Bi%5D)) %7B // care need (int)%0A                r++;%0A            %7D else if (t %25 (digits%5Bi%5D - '0') == 0) %7B // here%0A                divisible.add((int) digits%5Bi%5D); // here can just save (int) digits%5Bi%5D%0A                r++;%0A            %7D%0A        %7D%0A        System.out.println(r);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner s = new Scanner(System.in);%0A        int tests = s.nextInt();%0A        for (int i = 0; i %3C tests; i++) %7B%0A            calculate(s);%0A        %7D%0A    %7D%0A%7D%0A

Hacker ranck find digits