num
to a string s
.count
to 0.s
with a window of size k
.
a. Extract the substring of length k
starting at the current index.
b. Convert the substring to an integer currentNum
.
c. If currentNum
is not zero and num
is divisible by currentNum
, increment count
.count
.