div to store the divisibility array.remainder to 0 to keep track of the current remainder.c in the string word:
a. Convert c to its integer value digit.
b. Update remainder using the formula remainder = (remainder * 10 + digit) % m.
c. If remainder is 0, append 1 to div, otherwise append 0.div list.