I got many answers and do not know the correct one? Can this question be solved manually, or does it require coding?

Answer:

(1) is zero the multiple of all integer? If zero times whatever is zero, then someone think the answer is zero

(2) Someone said the answer is 48. He said there are six cases but he did not tell me how to got to this answer. He said it is too complicated to write down.

(3) 0 can only be adjacent to itself.

1 can be adjacent to any digit.

2 can be adjacent to 2,4, 6, 8

3 can be adjacent to 3,6,9.

4 can be adjacent to 4,8

Digits 5,6,7,8, can only be adjacent to themselves

Then by using recursion and computing power, the total number of arrangements is 576.

This is not a homework assignment; I would greatly appreciate it if someone could help and explain the correct answer to me.

Thanks