2269. Find the K-Beauty of a Number
class Solution:
def divisorSubstrings(self, num: int, k: int) -> int:
answer = 0
num_list = list(str(num))
N = len(num_list)
for i in range(N-k+1):
divisor = int("".join(num_list[i:i+k]))
if divisor and num % divisor == 0:
answer += 1
return answer