2
public int divisorSubstrings(int num, int k) {3
String str = String.valueOf(num); // to covert integer to String4
int count = 0; // count of ans..5
for (int i = 0; i < str.length() - k + 1; i++) // deciding the starting index of window7
String temp = str.substring(i, i + k); // storing string till window length8
int n1 = Integer.valueOf(temp); // converting string to integer9
if (n1 == 0) // to avoid division error13
if (num % n1 == 0) // if it is divisible then increase the count18
return count; // lastly return our count